help create dynamic measures to calculate the total amount in the form of tabluar

Hello world

We using apex 4.2 and start re-writing some existing applications originally designed in 3.0.   I was wondering if someone could help me with the following scenario.

I have a tabular presentation several recording based on a collection called "species_collection".  The form allows fisherman to create an electronic ticket which contains one species, quantity, price, total of the amounts and other descriptive information on the species.  I created a dynamic action (with lots of help from this forum) to automatically update the collection when a field is changed.

I am now in the hope of creating a dynamic action that will automatically do the following:

  • When the quantity is changed, recalculate the total of the amounts as quantity * price
  • When the price is changed, recalculate the total of the amounts as quantity * price
  • When dollars changed, recalculate the $ amount/total price.
  • When the total amount is changed, recalculate the OVERALL TOTAL

Currently, I use embedded calls to javascript and then to application processes... but they are difficult to debug, and it seems that dynamic action could be cleaner and simpler.

the current request is (I've included the concerned fields because it is an important application):

SELECT
apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
seq_id,
seq_id display_seq_id,
.....
apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
 
apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,

apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars
 ......
from apex_collections
 where collection_name = 'SPECIES_COLLECTION' order by seq_id 

each field, QUANTITY, PRICE, $ has an ONCHANGE that then call the application processes that update the collection.

<script language="JavaScript1.1" type="text/javascript">

function setTotal(row)
{
   //quantity was entered into form, get values
   var price = $x('f11_'+row);
   var total = $x('f12_'+row);
   var quantity = $x('f10_'+row);
   var nquantity = parseFloat(quantity.value);
   var ntotal;
   var nprice;
   nquantity = nquantity.toFixed(3);
   quantity.value = nquantity;
   //if quantity and price both have values calculate total and save
   if(quantity.value > 0 && price.value > 0)
   {
      ntotal = quantity.value * price.value;
      total.value = ntotal.toFixed(2);
   }
   else
   {
         //if quantity and total both have values calculate price and save
      if(quantity.value > 0 && total.value > 0)
      {
         nprice = total.value/quantity.value;
         price.value = nprice.toFixed(6);
         //check to see if the price entered falls within min/max for that species
         var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PriceBoard',0);
         get.add('SPECIESPRICE',price.value);
         get.add('SEQUENCEID',row);
         gReturn = get.get();
         if ((gReturn == 'Price entered is too high') || (gReturn == 'Price entered is too low')){alert(gReturn);}
      }
      else  if (quantity.value > 0)
               total.value = '';
            else
            { 
                 total.value = '';
                 quantity.value = '';
            }
   }
  //saveQPD(row);
   setOverallTotal(); 
}
function setOverallTotal()
{
   var total = 0;
   var nTotal;
   for(i=1;i<=rowCount;i++)
   {
      if(parseFloat($x('f12_'+i).value) > 0)
      {
         total = total + parseFloat($x('f12_'+i).value);
      }
   }
   ntotal = total.toFixed(2);
   document.getElementById("P110_TOTAL").value = ntotal;
   var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=nullProcess',0);
   get.add('P110_TOTAL',ntotal);
   gReturn = get.get();
}
function getPriceBoundaries(row) 
{
   //price was entered into form get all values
   var quantity = $x('f10_'+row);
   var price = $x('f11_'+row);
   var total = $x('f12_'+row);
   var ntotal;
   var nquantity;
   var nprice = parseFloat(price.value);
   nprice = nprice.toFixed(6);
   price.value = nprice;
   //check to see if the price entered falls within min/max for that species
   var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PriceBoard',0);
   get.add('SPECIESPRICE',price.value);
   get.add('SEQUENCEID',row);
   gReturn = get.get();
   if ((gReturn == 'Price entered is too high') || (gReturn == 'Price entered is too low')){alert(gReturn);}
   //if quantity and price both have a value calculate the total
   if(quantity.value > 0 && price.value > 0)
   {
      ntotal = quantity.value * price.value;
      total.value = ntotal.toFixed(2);
   }
   else
   {
      //if total and price both have a value calculate the quantity
      if(total.value > 0 && price.value > 0)
      {
         nquantity = total.value/price.value;
         quantity.value = nquantity.toFixed(3);
      }
      else
      {
         if(price.value > 0)
              total.value = '';
         else
         {
              total.value = '';
              price.value = '';
         }
      }
   }
   saveQPD(row);
   setOverallTotal();
}
function saveQPD(row)
{
   var quantity = $x('f10_'+row).value;
   var price = $x('f11_'+row).value;
   var total = $x('f12_'+row).value;
   //save quantity
   var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=setQuantity',0);
   get.add('SETVALUE',quantity);
   get.add('SEQUENCEID',row);
   gReturn = get.get();
//   alert(gReturn);
   //save price
   get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=setPrice',0);
   get.add('SETVALUE',price);
   get.add('SEQUENCEID',row);
   gReturn = get.get();
//   alert(gReturn);
   //save total
   var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=setTotal',0);
   get.add('SETVALUE',total);
   get.add('SEQUENCEID',row);
   gReturn = get.get();
//   alert(gReturn);
   
}
function changePrice(row)
{
   //total was entered get all rows
   var quantity = $x('f10_'+row);
   var price = $x('f11_'+row);
   var total = $x('f12_'+row);  
   var ntotal = parseFloat(total.value);   
   var nprice;
   var nquantity;
   ntotal = ntotal.toFixed(2);
   total.value = ntotal;
   //if quantity and total were entered calculate price.
   if (quantity.value > 0 && total.value > 0)
   {
      nprice = total.value / quantity.value; 
      price.value = nprice.toFixed(6); 
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PriceBoard',0);
      get.add('SPECIESPRICE',price.value);
      get.add('SEQUENCEID',row);
      gReturn = get.get();
         if ((gReturn == 'Price entered is too high') || (gReturn == 'Price entered is too low')){alert(gReturn);} 
   }
   //if price and total were entered calculate quantity.
   if (price.value > 0 && total.value > 0)
   {
      nquantity = total.value / price.value;  
      quantity.value = nquantity.toFixed(3);
   }
   if (price.value > 0 && quantity.value > 0)
   {
       ntotal = quantity.value * price.value;
       total.value = ntotal.toFixed(2);
   }
 
       
   saveQPD(row);
   setOverallTotal();        
}

function selectDollarsFocus(pRow,event)
{
    tabPress = 0;
    KeyCheck(event);
    if($x('f11_'+ pRow))
    {
            if(KeyID == 9)
            {
                $x('f14_'+ pRow).focus();
                onFocusAreaFished(pRow);
                tabPress = 1;
            }
    }
    else
    {
        if($x('f18_'+ pRow))
        {
                if(KeyID == 9)
                {
                    $x('f18_'+ pRow).focus();
                    tabPress = 1;
                }
        }
        else
        {
            if(--pRow <= rowCount)
                if(KeyID == 9)
                {
                    $x('f08_'+ pRow).focus();
                    tabPress = 1;
                }
        }
        
    }
}



</script>

I'm not very familiar with javascript... but looks like there must be a simpler way.   Any thoughts on how I could address the issue?   Thank you!

I have it.  trial and error.

the DYNAMICS of the evolution of prices and the $ action are now two separate dynamic actions.

Action DYNAMICS to update the column from the collection is now last... and it seems that everything works... until I have change something again.

Thanks again for your help.

Karen

Tags: Database

Similar Questions

  • How to use PL/SQL to create dynamic action to set the value of a selection by another list?

    Hello

    I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.

    1.PNG

    I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).

    When you select "1074" in the bathroom, building highlights like "BRM BLD 5"

    When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"

    When the room is Null, building should also be Null.

    I thank you,

    Alice

    I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.

    Thank you

    Erick

  • How can I creat photoshop filters and rendering the form of exe file

    Hello.. How are you all, I hope you fine...

    I want to know if I can creat photoshop filters and rendering the form of exe file...

    and thank you...

    If you really want to create a good filter/plugin and distribute it I can only recommend that you try the SDK Forum.

    Photoshop Plugin and companion App SDK

    Adobe Photoshop SDK | Adobe Developer Connection

  • Is it possible to create some custom shapes in the form of buttons for the composition of ToolTip widget?

    Basically, I have a collection of triangular shapes (orange cross section), and I want each segment/triangle is a thing of button ToolTip. So if you hover over a triangle it changes color and text appears below the orange itself. But the ToolTip widget composition seems limited to a form of square/rectangle for the container of button (I can put my image of triangle inside, but not change a square container).

    Any help? Picture below shows what I'm trying to achieve, the segment is red to show the form that I want.

    Thank youScreenshot (6).png

    Currently, it is not possible with only Muse. Should the graphics cards that are not supported. Your best plan would be to create as a composition of edge animate and then add it to the Muse.

  • calculate the forms feature will not allow me to check a box

    I use Adobe Acrobat X Pro.  In the forms, using the calculate function, I can't verify or check a box to

    Some people have this problem and can get around by clicking close boxes, and others use the keyboard (space to toggle a check box, tab/arrows up/down in the list). Others find the simplified field notation more convenient, and I almost always use the custom JavaScript option.

  • How to create a function to calculate the calendar

    Oracle Forms 6i

    Hai

    I'm generating a daily presence that is stored in the database with the fields

    Empcode, attend_date, intimate, outtime, extratime, deptcode, unitid and some other things

    I need to create a function by taking these fields of the table unitid, empcode, intimate, outtime, attend_date, deptcode and return total hours he worked, and more than 8 means it will add in extra time.

    If it is possible to give the run of the date value to which to this day, you must calculate.

    Thanks in advance

    Srikkanth.Ml

    Srikkanth,
    Depending on how you stated your RESPONDENT and OUTTIME, columns this should quite simply be a calculation. For example, if you have declared these columns as DATE columns, the following calculation should work:

    SELECT NVL(OUTTIME,SYSDATE) - INTIME AS hours_worked
    FROM DAILY_ATTENDANCE
    WHERE EMPCODE = "Emp Code of the employee you are evaluating";
    

    Once you have the HOURS_WORKED, you can check if the amount is greater than 8 (or whatever is the approved duration of working hours of the employee's) to determine if he or she worked longer than their approved shift back the extra time, and the user has worked or NULL or zero if they have not exceeded their shift.

    If you have set up the columns of time as something other than the DATE or DATETIME, you will need to convert the values in input/OUTPUT at a DATE so that you can use the functionality of calculation date default Oracle or you need to build your own process of calculation of the WORK_HOURS based on how you store the RESPONDENT and OUTTIME values.

    I hope this helps.
    Craig...

  • Is there a feature any studio 8.6 measure to calculate the linear interpolation or grooves on a set of data points

    Hello

    I have a set of (X, Y) values, and I need to calculate either linear interpolation or some type of spline (e.g. linear) using these values, so I would like to know if OR Measurement Studio 8.6 provides a function implemented to achieve this.

    Thanks in advance.

    The following functions are available in OR Measurement Studio Enterprise Edition:

    NationalInstruments.Analysis.Math.CurveFit.SplineInterpolation => for the spline interpolation
    NationalInstruments.Analysis.Math.CurveFit.PolynomialInterpolation => for polynomial interpolation

  • How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

    Hi all

    Suppose I have table, whose structure changes frequently on a daily basis.

    For example. / / desc my_table gives you after the name of the column the day 1

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone


    Day 2, two other columns are added, viz, address and salary.

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone

    Address

    Salary


    Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

    For 1 day my XML file should be like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 1, EXCEL output RTF model should be like this.
    Name age phone

    Swapnill 23 12345

    For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 2, exit EXCEL model RTF should be like this.
    Name address telephone pay

    23 12345 Madrid 100000 Swapnill

    Now, I don't know below things.

    • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
    • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

    Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

    Kind regards

    Patricia K.

    Post edited by: SwapnilK

    Hi guys,.

    I was able to solve above the requirement.

    I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

    Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

    Kind regards

    Patricia K.

  • Dynamic calc to calculate the sum of the months in the years

    I have a 6.5.5 Essbase cube with a size of periods containing months and weeks as members stored, labeled as time. I also have a dimension of the year that contains exercises and these members can also be stored. I have to add together the first month of this year and the last month of last year.

    I can do this:

    M12-LY + M01-> TY >

    Gives me the right answer and I could configure IF statements through Sunday to the correct value of LY, but I would like the formula dynamically select the correct LY based on the year TY that the user puts in place in their query. I tried some combos using @prior and @shift and it is not working properly.

    Here is what I thought might work:

    M01 + (@SHIFT (Year-1));

    This formula results by adding just the M01 and nothing of LY. Any thoughts on how to configure this formula?

    Published by: user11908498 on 16 Sep, 2009 05:55

    Published by: user11908498 on September 16, 2009 11:42

    What your year Sun look like?

    The support is that it looks like this

    Year
    -2008 (LY)
    -2009 (TY)

    So if you're on TY, then shift - 1 (or before) it would go to the 2008 (LY)

    By chance your year sun goes in the opposite direction

    Year
    -2009 (TY)
    -2008 (LY)

    In this case, you will have to go the other way

    "M01" + @SHIFT ("M12", 1, @CHILDREN ("Year"));

  • Creating tabs for example in the form

    Hello

    Page: http://developer.blackberry.com/native/documentation/cascades/ui/navigation/multiple_screens_tabs.ht...

    The example of the 'Using a TabbedPane in C++' gives me the error:

    cannot call the member function "Sub bb::cascades:Application:setScene(bb::cascades::AbstractPane*)" without object

    From the line:

    Hello

    setScene expects an object, but you are qualifying based on the static class. Try:

    Application::instance ()-> setScene (root)

  • Help with dynamically created components (turning point properties on or off)

    Hi all! I'm working on an application with a bunch of delegates of control is created dynamically.

    Here's my use case-scenario:

    I do a type app GPA calculator, and instead of hard coding a lot of drop-down lists for students select notes, I created a custom component. According to the documentation, each component created dynamically are destroyed until the parent TI auto is destroyed. ControlDelegate seems to be a better option that you can set the flag to false to make the component to go.  I created a delegate of control that uses the custom of the list drop-down and added a few aliases to give each a name of object on creation. Now, my problem is that I can't understand the correct item call to the property delegateActive set to false to make the element disappear.

    Here is the delegate of the control:

    import bb.cascades 1.2
    
    Container {
        property alias cT : classTitle.text
        property alias oN : obName.text
        property alias dN : dDown.objectName
        property alias cdF : dDown.delegateActive
        property alias dDown : dDown 
    
        topPadding: 10.0
        bottomPadding: 10.0
    
        ControlDelegate {
            id: dDown
            sourceComponent: droDwn
            delegateActive: true
        }
        attachedObjects: [
            ComponentDefinition {
    
                id: droDwn
                GpaDD {
                    ddPro {
                        title: cT
                        objectName: oN
                    }
                }
            }
    
        ]
    
        Label {
            id: classTitle
            text: ""
            visible: false
        }
        Label {
            id: obName
            text: ""
            visible: false
        }
    
        onTouch: {
            console.log(dDown.delegateActive + " " + dDown.objectName)
        }
    }
    

    on the home page, I have the following code to create a new component:

    Page {
        id: gpaCalc
        actions: [
            ActionItem {
                id: addDD
                title: "Add Class"
                imageSource: "asset:///images/add.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    var nn = ddContainer.count();
                    var newDD = defDrop.createObject();
                    newDD.cT = "Class " + [ nn ];
                    newDD.oN = "_" + nn;
                    newDD.dN = "_" + nn;
                    ddContainer.add(newDD);
    
                }
            },
            ActionItem {
                id: remDD
                title: "Remove Class"
                imageSource: "asset:///images/Edit.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    console.log();
                }
    
            }
        ]
        attachedObjects: [
            ComponentDefinition {
                id: defDrop
                DropDelegate {
                }
            }
        ]
        Container {
    
            /* ImageView {
             * horizontalAlignment: HorizontalAlignment.Fill
             * verticalAlignment: VerticalAlignment.Fill
             * imageSource: "asset:///images/rect_overlay.png"
             * opacity: 0.65
             * }*/
            ScrollView {
                horizontalAlignment: HorizontalAlignment.Fill
                verticalAlignment: VerticalAlignment.Fill
                scrollViewProperties {
                    scrollMode: ScrollMode.Vertical
    
                }
                Container {
                    horizontalAlignment: HorizontalAlignment.Fill
                    verticalAlignment: VerticalAlignment.Fill
                    topPadding: 50
                    leftPadding: 50
                    rightPadding: 50
                    id: ddContainer
    
                    onCreationCompleted: {
                        if (ddContainer.count() < 2) {
                            var nn = ddContainer.count();
                            var newDD = defDrop.createObject();
                            newDD.cT = "Class " + [ nn ];
                            newDD.oN = "_" + nn;
                            newDD.dN = "_" + nn;
                            ddContainer.add(newDD);
                        }
                    }
                    Label {
                        text: "Select Your Grades"
                        textStyle.fontStyle: FontStyle.Normal
                        textStyle.fontWeight: FontWeight.W100
                        verticalAlignment: VerticalAlignment.Top
                        horizontalAlignment: HorizontalAlignment.Center
                        textStyle.fontSize: FontSize.XXLarge
                    }
                }
                accessibility.name: "TODO: Add property content"
            }
        }
    }
    

    How can I find the last delegate of control created to define the delegate tag as wrong?

    Any help is appreciated!

    You have so much you need to do it this way?
    Why not just have a placeholder for * each * drop-down list and turn them on and off individually using delegateActive?

  • Help! I do not see my comments of the form I created

    Here is the form I created

    When I fill the form in Firefox and access it via my email client that I put in place in my email_form.php, I get the email, I see the name and the email address I put in shape, but I don't see the comments I put in shape. I have another site where all that it works, but not this one.

    < do action = "email_form.php" method = "post" enctype = "application/x-www-formulaires-urlencoded" name = "contact" target = "_blank" id = 'contact' > "
    < fieldset > < legend > Your Contact Information < / legend >

    First name < p > < label for = "name" > < / label >
    < input name = "name" type = "text" id = "name" size = "30" maxlength = "50" > < / p >

    < p > < span id = "sprytextfield1" >
    < label for 'email' = > Email < / label >
    < name of entry = "email" type = "text" id = "email" size = "35" maxlength = "50" >
    < span class = 'textfieldRequiredMsg' > an email address is required. </span > < span class = "textfieldInvalidFormatMsg" > please enter a valid email address. </span > < / span > < / p >
    < p >
    Comments of < label for = "comment3" > < / label >
    < name textarea = cols 'commentary' = "50" rows = "6" id = "comment3" > < / textarea >
    < /p >

    < p > < input type = "submit" name = "submit" id = "submit" value = "Submit Your Request" > < / p >
    < / fieldset >
    < / make >

    It is not the label name which must match, it is the name of the form control. Your textarea is named 'how', but your script is looking for 'message '.

  • Re: creating dynamic associative arrays

    Hi, I need some advice on the following problem. I develop code that allows me to copy & paste a spreadsheet into a TextArea and parse text pasted to dynamically generate a DataGrid control. I assume that the first line of text contains the headers of each column, parse the line and dynamically generate the columns to the DataGrid control. Now I need a way to generate each Clotilde the DataGrid from the rest of the lines. The question that I'm struggling with (new Flex) is. I think I need to create an associative array of the form:

    var asArray:Object = {col1: 'value1', col2: "Value2", etc.}

    The problem is that all the column names in a table and each value is stored in another table. How to dynamically create a construction which will be

    take me to represent a row in a DataGrid as described in EnTableau? In other words, is there a way to dynamically generate a statement like the one above?

    Grateful for your help!

    Ko

    If I understand correctly, you are able to analyze all your data to two types of arrays:

    var table: columns = {"column1", "column2",...}

    var rowValues:Array = {, ",...}

    So as you can see I guess that each value in rowValues table has light-emitting column name in the columns table. So you can build your 'associative' (in fact it is just a simple object) like this:

    var rowObject:Object = new Object();

    for (var i: int = 0; i< rowvalues.length;="" i++)="">

    rowObject [GBA [i]] = rowValues [i];

    }

    The heart of the loop is the third line and the use of hooks on an object.

  • Dynamic action - check if the size of the texfield values does not exceed limit

    Hello

    I have a form and I'm trying to use dynamic Action to process the form values. I don't know how to get the length of the value of a textfield and compare to what I said in the values

    The order of the day called P6_USERNAME which can be more than 10 characters long.

    So I tried to create a dynamic Action with the following parameters in the region when .

    EVENT: Press button
    SELECTION TYPE: jQuery Selector
    jQuery SELECTOR: $("P6_USERNAME").val () .length
    CONDITION: above
    VALUE: 10

    Of ACTION GENUINE, I had a view only showing a message "you have exceeded the limit.

    The above didn't work and tried to work it around with:

    $v("P6_USERNAME").val () .length

    that no longer works.

    Any suggestions on how I can achieve this? The only options I got in the Type of selection are: point, area, object DOM and jQuery Selector. What I'm really after is retrieving the value of the element, so I can use it for comparison with the value to run my Real Action

    APEX 4.0 - Oracle XE 11 G - Windows 7 32 bit

    It is not necessary to use a validation/dynamic action. Set the maximum width for the element attribute and the browser will prevent users to enter values longer than that.

  • [SOLVED] Create ViewObject as placeholder for the parameters of the form

    Hello

    I posted the following question (JDeveloper 11.1.2.3):

    http://StackOverflow.com/questions/14592202/create-ViewObject-as-placeholder-for-form-parameters

    Basically, how do you create a ViewObject that can perform validation and harness LOVs, but don't don't don't need to be supported by any source of data?

    Is it still the right approach?

    Thank you!

    Hey, Timo.

    This can be accomplished without an OA. As far as I can tell, it's the right answer, but this forum does not allow me to choose my own answer as correct, but somehow allows me to report my own post as an abuse. Strange.

    Find the property formatted (and selected as correct) answer on StackOverflow: http://stackoverflow.com/a/14611815/59087

    # Solution

    You have:

    -Create a view object to be programmatic, with the desired attributes.
    -Configure the view with validation rules object.
    -Configure the Module of the Application.
    -Create the form on the web page.
    -Update the page link to create a new line.

    # Create object View

    Create the view as follows:

    1. type Control+n to open the * New Gallery *.
    1. search and select * view object *.
    1. click on * OK *.
    1 set * Package *, * name *, and * display name * properly.
    1 set * data * to * programme *.
    1. click on * following *.
    1. click on * new * and provide a significant attribute name.
    1. click on * OK *.
    1. Add the remaining attributes.
    1. click on * following *.
    1 set * Updatable * to * always * all attributes.
    1 set * Type * for the appropriate data type.
    1. click on * finish *.

    # Configure Validation rules

    Configure the following validation rules:

    1. click on the * attributes * tab.
    1. Select the desired attribute.
    1. click on the * tab Validation rules *.
    1. click on the * + * icon in the * section Validation rules *.
    1 set it * rule definition * as required.
    1. set * error * as required.
    1 Repeat to add validation as necessary rules.

    At this point a view object has been configured and the * list tab of values * can be used to reference LOVs based on a query.

    # Configuration Application Module

    Configure the module of the application as follows:

    1 double-click on the module of the app.
    1. Select * model data * tab.
    1 Shuttle the object view of * available see items * to * model data *.
    1. remove the * 1 * suffix.
    1. save the application.

    Note: If the view object is not visible, restart JDeveloper.

    # Create Web Form Page

    Create a web page to the form as follows:

    1. create a new JSF of the object view page.
    1 update the * data controls * see the instance of the view object.
    1. drag and drop the view on the page object.
    "1. Select * form" ADF form *.
    1 check * include submit button *.
    1. click on * OK *.

    The web page is created.

    # Update the Page link

    Cannot change the attributes of the view object unless there is a 'line' created for the instance of the view object. Creation of this line in memory must occur before the display of the content on the page. Accomplish this as follows:

    1 extend the data controls to reveal the view object * operations *.
    1 drag * Create * in the facet of footer.
    1. Select * ADF button *.
    1. right-click on the page.
    1. Select * go to Page definition *.
    1. click on * + * next * executable *.
    1. Select * invokeAction *.
    1. click on * OK *.
    1. set * id * to: create
    1. set * lie * for: create
    1. click on OK.
    1. the refresh value: * prepareModel *.
    1. save all.

    You can now remove the create"" button.

    The validation is applied, and data-driven LOVs can be used.

    Published by: Dave.Jarvis on January 30, 2013 11:15

Maybe you are looking for

  • ox80240036-error pops up saying could not find page

    just try to install automatically dates and get this pop up

  • Need help with internet access on a Linksys E1200 strategy

    Hi, I have an a Linksys E1200 (Firmware Version: 2.0.01), and September 13, 2012, I configured the Internet access policy to deny access to internet for 4 devices between the hours of 22:00 and 08:00 on the evening of the school.)  It was working fin

  • WAP561 - does not

    Hello We have a set of WAP561s, new brand out of the box, which after a few hours of being powered will no longer respond. They don't respond to pings, and the web interface is not available. However, they always broadcast their SSID - and will allow

  • best offer for video

    HelloI'm on photogrphy supply for (in Germany) 11.89 EUR / month. I'm doing some film shots too, but not all the days so a Premiere Pro plan 23,79 EUR / month isn't going to be useful. Do you intend to offer a video as the photogrphy one? For example

  • I have not used this software for more than two years, but it keeps renewing automatically.

    That is some $700 I paid for software that I don't use. I tried to cancel, but the instructions lead to links that lead to the instructions which lead to links that lead to the instructions. I clicked on the many links to cancel, but they actually do