Back to zero/recalculate value if the element with dynamic action

Hi all

What I have is a part of "total amount". When the other elements on the form are filled, these values are subtracted from the total. My problem is that when a few points to say a filled out, but then set to zero, the figure in the total does not reset. If no new figure added, are more excluded.

For example:
total = 10
Value of 1 changed to 5. Total = 5.
Value of item 2 changed to 1. Total = 4.
Value of 1 changed to 2. Total = 2.

I find it tricky is because the total is derived from an action of current setpoint led other points. Finally, I would like to reset or re - run the calculation for the total, without duplicating the original action of the set value. I tried to use a dynamic action "Refresh" but I don't think that work in this way. Is there another way?

Why not save the original value to an item hidden page (or even in a global variable set before you run the JS calculation for the first time in javascript).
During the reset, set the value of the element with the value of the hidden (or variable).

Tags: Database

Similar Questions

  • How can I get the value of the element with the namespace?

    I tried to get an element of value in xml a namespace, but I can't.
    I removed the namespace, I get a value of the element.

    How can I get a value of the element with the namespace?

    -1. Error ----------- xml ------------------------------
    <? XML version = "1.0" encoding = "UTF-8"? >

    * < TaxInvoice xmlns = "" urn: kr: or: kec:standard:Tax:ReusableAggregateBusinessInformation:1:0 "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xsi: schemaLocation =" urn: kr: or: kec:standard:Tax:ReusableAggregateBusinessInformation:1:0 http://www.kec.or.kr/standard/Tax/TaxInvoiceSchemaModule_1.0.xsd "> *"
    < ExchangedDocument >
    < IssueDateTime > 20110810133213 < / IssueDateTime >
    < ReferencedDocument >
    < ID > 318701 - 0002 / < ID >
    < / ReferencedDocument >
    < / ExchangedDocument >
    < TaxInvoiceDocument >
    < IssueID > 201106294100 < / IssueID >
    < > 0101 TypeCode < / TypeCode >
    < IssueDateTime > 20110810 < / IssueDateTime >
    < PurposeCode > 02 < / PurposeCode >
    < / TaxInvoiceDocument >
    < TaxInvoiceTradeLineItem >
    < SequenceNumeric > 1 < / SequenceNumeric >
    < > 200000000 InvoiceAmount < / InvoiceAmount >
    < TotalTax >
    < CalculatedAmount > 20000000 < / CalculatedAmount >
    < / TotalTax >
    < / TaxInvoiceTradeLineItem >
    < / TaxInvoice >


    -2. success - xml - remove namespace.
    <? XML version = "1.0" encoding = "UTF-8"? >
    < TaxInvoice >
    < ExchangedDocument >
    < IssueDateTime > 20110810133213 < / IssueDateTime >
    < ReferencedDocument >
    < ID > 318701 - 0002 / < ID >
    < / ReferencedDocument >
    < / ExchangedDocument >
    < TaxInvoiceDocument >
    < IssueID > 201106294100 < / IssueID >
    < > 0101 TypeCode < / TypeCode >
    < IssueDateTime > 20110810 < / IssueDateTime >
    < PurposeCode > 02 < / PurposeCode >
    < / TaxInvoiceDocument >
    < TaxInvoiceTradeLineItem >
    < SequenceNumeric > 1 < / SequenceNumeric >
    < > 200000000 InvoiceAmount < / InvoiceAmount >
    < TotalTax >
    < CalculatedAmount > 20000000 < / CalculatedAmount >
    < / TotalTax >
    < / TaxInvoiceTradeLineItem >
    < / TaxInvoice >




    -program-
    procedure insert_table
    (
    l_clob clob,
    OK, Boolean.
    Error out varchar2
    )
    is
    l_parser dbms_xmlparser. Analyzer;
    xmlDoc xmldom.domdocument;

    l_doc dbms_xmldom. DOMDocument;
    l_nl dbms_xmldom. DOMNodeList;
    l_n dbms_xmldom. DOMNode;
    l_root DBMS_XMLDOM.domelement;
    l_node DBMS_XMLDOM.domnode;
    l_node2 DBMS_XMLDOM.domnode;
    l_text DBMS_XMLDOM. DOMTEXT;

    buf VARCHAR2 (30000);

    XMLParseError exception;

    TYPE tab_type is Table of xml_upload % ROWTYPE;
    t_tab tab_type: = tab_type();
    pragma exception_init (xmlparseerror,-20100);
    l_node_name varchar2 (300);

    Start
    l_parser: = dbms_xmlparser.newParser;
    l_doc: = DBMS_XMLDOM.newdomdocument;
    dbms_xmlparser.parseClob (l_parser, l_clob);
    l_doc: = dbms_xmlparser.getDocument (l_parser);
    l_n: = dbms_xmldom.makeNode (l_doc);

    l_nl: = dbms_xslprocessor.selectNodes (l_n, ' / TaxInvoice/TaxInvoiceDocument ');

    FOR cur_tax in 0.dbms_xmldom.getLength (l_nl) - 1 LOOP
    l_n: = dbms_xmldom.item (l_nl, cur_tax);

    t_tab.extend;

    t_tab (t_tab.last) .ed_id: = '5000000';

    dbms_xslprocessor.valueOf (l_n, ' IssueID / text () ', t_tab (t_tab.last) .tid_issue_id);
    dbms_xslprocessor.valueOf (l_n, ' TypeCode / text () ', t_tab (t_tab.last) .tid_type_code);

    END LOOP;

    FORALL i IN t_tab.first... t_tab. Last
    INSERT INTO xml_upload VALUES t_tab (i);

    COMMIT;

    dbms_xmldom.freeDocument (l_doc);
    correct: = true;

    exception
    When xmlparseerror then
    -xmlparser.freeparser (l_parser);
    correct: = false;
    error: = sqlerrm;

    end insert_table;
    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');
    

    try to change as follows

    l_nl := dbms_xslprocessor.selectnodes(l_n,'/TaxInvoice/TaxInvoiceDocument','xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0"');
    

    Published by: Alexandr on August 17, 2011 12:36 AM

  • xmlObject - value of the element with a particular attribute

    Hello

    In an xmlObject, I try to set the value of the element xml with a special attribute, but it does not work

    //get value of element with a particular attribute
    var myValue = xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))// works fine
    //set value of element with a particular attribute
    var myValue = "foo"
    xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))= myValue // doesn't work
    

    Thanks for your help

    Concerning

    The E4X (?) XML syntax is powerful, but you can easily get lost with the bad node types. That is why my answer included the .writeln $ nature - 'list' - and used an index for the change; After validation, I found that your assignment would have also worked on the only indexed element. Thanks for sharing your discovery with setChildren() - who apparently works also on the lists.

    Dirk

  • Set values in a table with dynamic Action?

    Hi, I need help for my Application first, Apex, please. This page is for users of fuel truck who buy several gallons of fuel and use this page to distribute this fuel among the many projects. These users are familiar with filling in the Date of the Transaction, the Site, the Type of fuel from the fuel tank #, etc. on the top of the page and then using the lines below to split the fuel in different projects.

    Example: The user gets 100 gallons delivered, fills the Page elements on top with the details of the purchase and uses then 3 rows of tabular form to distribute among 3 project (Project1 gets 20 gallons, Project2 gets 30 gallons, Project3 gets 50 gallons). Each line in the form of tables inserts a new record in the table of database of fuel with different values for the Gallons and ProjectID, but the same Site, Date, Type of fuel and tank values.

    So there are columns hidden on the tabular presentation for Site, Date, Type of fuel and tank. They need get these values from the top so that the user doesn't have to type repeatedly. This is my problem: How can these hidden columns to get the values in the top text boxes dynamically? It must be dynamic, or changed immediately if the user changes anything in the decoders (as a typo).

    Just going to each as a column and defining the 'attributes of tabular form' by default for an item and then by setting the default value in the name of the element page text box will only work if somehow, the user submits the page and does not make typing errors before you fill out the form in a table. I need to be adjusted immediately. Also, is it something special to set the date picker on the form as a table for the value of the Date on the top picker? For the moment, I am trying to use the Set button to set the values in the boxes at the top of the page with their items and refresh the page, so the default values of the column in a table can be right. Is there a better way to do it? It does not work for the date picker.

    I just started to use Apex, I only know the basics of dynamic Action HMI. If I should use a jQuery or code in the HTML header or a 'Collection' Apex, be very specific. Page elements above have names like P13_TANK and the P13_TRANSACTION_DATE of Date Picker and the shape of the table has column names like TANK and TRANSACTION_DATE. Truckers and I appreciate any help, thanks!

    apex question.png

    ~ Saphira

    I forgot a few quotes:

    $("input[name='f05']").val(this.triggeringElement.value);
    
  • refresh the report with dynamic action title

    Hi all

    I have a report that is updated with dynamic action. When the update is done, first the value of two hidden variables are defined (P2_ID and P2_NAME) and are subject (using a dynamic action type "pl/sql", with the code "null"; and items to submit page: P2_ID, P2_NAME).

    In the report query, I use: P2_ID in the where clause. Everything works like a charm! The only thing that doen't work, is the title of the region: which is defined as "properties of & P2_NAME.", but the title is not updated when the report is refreshed.

    Is there a solution for this? I hope I am clear enough.

    See Re: dynamic action - update

    If you are right; the native just Refresh action updates the content of the report, it does not perform & POINT. substitutions throughout the region.

    What you could do is use a RANGE named as the title as

    &P2_NAME.
    

    and add a REAL action to your dynamic Action to set the title using Javascript to run code

    $s('my_title',$v('P2_NAME'));
    

    I hope this helps.

  • How to transfer the text value of the element with the character of new line between pages?

    Hello

    I use the Application Express 4.2.2.00.11 on the 11g XE database. In my application, I use the transfer of certain values deposited between pages on a lot of places in my application. But now I have a specific problem with a textarea element.

    I have the page with the textarea element and I transfer element value to another page using the link button. I use "Set these elements" "with these values" mechanism.

    Everything works fine until I try to add the new line character in the area of the text box to be transferred to another page. I get this error message when I try

    Contact your administrator for the application. The checksum calculated on the basis of the application, clear the cache, names of arguments and argument values (711P711_TEXTabc CRC [A55D4D4B325E23CB83EF28FB7671E8F0]) does not match the checksum passed to the procedure of show (23CC724ADDA630B6F3BDFD2FEE1498E0). Note: users receive a different error message.

    Transfer of value to another implementation of page when I 'abc cde' in the text box.

    Transfer of value to another page do not work when I 'abc [line break] cde' in the text box.

    Value of transfer with the new line character point works when I change "Arguments must have checksum" "Unrestricted" on the landing page. But I want to use the shared services provider and do not want to disable checksum calculation.

    It seems that there is a bug in the function of calculation of sum of internal control...

    You have some tips?

    Cardel wrote:

    I use the Application Express 4.2.2.00.11 on the 11g XE database. In my application, I use the transfer of certain values deposited between pages on a lot of places in my application. But now I have a specific problem with a textarea element.

    I have the page with the textarea element and I transfer element value to another page using the link button. I use "Set these elements" "with these values" mechanism.

    Everything works fine until I try to add the new line character in the area of the text box to be transferred to another page. I get this error message when I try

    Contact your administrator for the application. The checksum calculated on the basis of the application, clear the cache, names of arguments and argument values (711P711_TEXTabc CRC [A55D4D4B325E23CB83EF28FB7671E8F0]) does not match the checksum passed to the procedure of show (23CC724ADDA630B6F3BDFD2FEE1498E0). Note: users receive a different error message.

    Transfer of value to another implementation of page when I 'abc cde' in the text box.

    Transfer of value to another page do not work when I 'abc [line break] cde' in the text box.

    Value of transfer with the new line character point works when I change "Arguments must have checksum" "Unrestricted" on the landing page. But I want to use the shared services provider and do not want to disable checksum calculation.

    It seems that there is a bug in the function of calculation of sum of internal control...

    You have some tips?

    This is one of the many reasons why it is inappropriate pass strings of characters between the pages through the URL. Instead of using a redirect button, change the button to send the page, then use the conditional calculations to set the values on the landing page and finally access the page using a conditional on submit: before Validation: (after calculation and before Validation and treatment) branch. When you press button terms of use on the calculations and the direction.

  • Masking multiple elements with dynamic action me gives error

    Hello

    I have a selection list, and I tried to create a dynamic action on this subject. When the list is zero I want to hide items. The problem is that I thing 200 articles on my page and when I try to list them all under the dynamic action, it gives me an error or cut off my list. I tried created two separate actions of dynamics, but it did not work. Any suggestions? Any help would be so appreciated. Thank you!
    The problem is that I thing 200 articles on my page and when I try to list them all under the dynamic action, it gives me an error or cut off my list.

    Is it that you were able to cross the mark of products/page 100? But the official documentation has to say otherwise:
    http://docs.Oracle.com/CD/E23903_01/doc/doc.41/e21674/limits002.htm#BGGIECDF

    It is possible to define and to return more than 100 items on a page, but you will get a 404 error when running if you submit a page with over 100 articles (including the hidden objects and elements of page zero). You will not be able to present and process a page that has made more than 200 points. You will be able to set more than 200 items in your page and send, and then process the page If the actual number of elements returned is limited to 100 or less by using permissions and conditions.

    * Specify error messages you received

    Error message: error failed to create dynamic action.
    ORA-20001: error creating dynamic action sub-action name = "NATIVE_HIDE" id = "" ORA-01461: can bind to a LONG value only for insert into a LONG column > "

    You seem to have exceeded a 4000 or 32 K bytes on a column of metadata for dynamic action when you set the dynamic action. Because you cannot use all 200 points at the same time, you must create multiple dynamic actions that correspond to some subsets of items are actually rendered.

  • How to omit elements/attributes if the value of the element is zero?

    Hi gurus

    It's me again. with a quick question...
    I'm sure everyone knows the difference between these two statements (running in the SCOTT schema):

    Select
    XmlElement ('employees',
    XMLAGG)
    XMLFOREST (comm as "SalesCommEmployee")
    )
    )
    EMP;

    Select
    XmlElement ('employees',
    XMLAGG)
    XmlElement ("SalesCommEmployee", comm)
    )
    )
    EMP;

    First statement out fewer records because XMLFOREST shows nothing if the value of the element is null.
    But what happens if element has attributes?. Say:

    Select
    XmlElement ('employees',
    XMLAGG)
    XmlElement ("SalesCommEmployee", xmlattributes (empno as "id"), comm)
    )
    )
    EMP;

    Is it possible to omit any element (including attributes) if the value of the element is set to zero.
    Of course, it is a simplistic example, in this case, a WHERE clause would solve the problem.
    In my particular case, I am managing a huge SELECT with multiple levels of xml and some elements (with attributes), may have null values, and must be included in this case nothing.

    I am considering a dirty search/delete option on the output, but I think that a more elegant solution must exist.

    Can you give me some advice?

    Thank you
    Oscar

    Hello

    You can use a CASE statement, DECODE or NVL2 functions.

    Here is an example with NVL2 (returns 2nd argument if the 1st is not not null, otherwise the 3rd):

    SQL> select xmlserialize(document
      2           xmlelement("Employees",
      3             xmlagg(
      4               nvl2( comm
      5                   , xmlelement("SalesCommEmployee", xmlattributes(empno as "id"), comm)
      6                   , null )
      7             )
      8           )
      9           as clob indent
     10         ) as result
     11  from scott.emp
     12  ;
    
    RESULT
    --------------------------------------------------------------------------------
    
      300
      500
      1400
      0
    
     
    
  • Value of the element in the referring URL

    I want to use a URL to connect to an application/page to a page of application/2nd and pass a value of an item on the 1st page/application at a point in the 2nd page/application - and within the URL also submit application 2/page.

    The first application/page reflects the details of an employee, with a button to access the 2nd app to view the details of active employees.

    The application/2nd page has two parts, one for a parameter for the employee ID field and a "run" button the second is a report of the property using the parameter as a filter for the report field. The report runs on the loading of the page - when the key - a branch to the same page comes to reload the page, this time with a filter to display the filtered report.

    On the 1st application, I use a button and creates a branch to/url of the page before the treatment.
    I can't conceive the URL in order to pass a value to a page element in the 2nd request if I hard code of the 'value' for the item:
    f? p = 106:1: & SESSION. : RUNQUERY:P1_EMPL_ID:12:

    This will go to a page in app 106, keeping the Session ID and put a value of 12 in the item page (parameter field) P1_EMPL_ID.

    Question:
    (1) how do I (or can I) refer to a value of the element application 1 in the URL instead of the real value? v (P2_ID) instead of 12?

    (2) even if you use a hard-coded as above, using 12... the parameter field gets the value, send the page seems to work - but the report does NOT get updated until I press the new button. The button - submit on 'RUNQUERY' - there is a branch back to page 1 on submit after transformation when you press the button: RUNQUERY (Submit).

    So 2 questions:
    How to refer to an element value in a URL?
    I'm referencing the part of the submission of the URL correctly?

    Thanks in advance...

    Rich

    try to:

    &P2_ID.
    
  • value of the element is not common when used in dynamic action

    I'm learning the 5 apex and I wanted to create a page that would update the fields in a record by entering the unique id of the recording using a dynamic action with plsql.

    When I click on the button update the value of the element of the text uses the previous value and not the input current. The 'works' update, but the ID values are not appropriate.

    How can I make sure that when I click on the update button, the dynamic action will get the current value of the text element and not the previous (when the page was submitted)?

    I created a quick demo or what I was testing in apex.oracle.com and always gives me the same result.

    dacoellov wrote:

    I'm learning the 5 apex and I wanted to create a page that would update the fields in a record by entering the unique id of the recording using a dynamic action with plsql.

    When I click on the button update the value of the element of the text uses the previous value and not the input current. The 'works' update, but the ID values are not appropriate.

    How can I make sure that when I click on the update button, the dynamic action will get the current value of the text element and not the previous (when the page was submitted)?

    I created a quick demo or what I was testing in apex.oracle.com and always gives me the same result.

    What dynamic action event and what types of action are involved here? Provide details, or better yet share identification information of developer comments for the apex.oracle.com workspace so that we can see the demo.

    If the dynamic action executes an SQL statement or a PL/SQL process on the server that requires page updated element values in session state, specify these items as part of dynamic action Page to submit items .

  • dynamic action sets the value of the element, but not save to DB on submit

    I'm working on a page where the value of several to show only the page elements are defined using a dynamic Action.  They are set when the user selects a value in a list of selection (and is based on the value of the selection list).  Dynamic action is triggered on a list selection change event and then runs the real action "set the value.  The selection list displays the names of sales representative.  The three fields dynamically filled are the org structure (that is, their chain management).

    For the action to set the value, I use a defined Type of SQL statement:

    Select VP, DIR, MGR

    of SALES_ORG where SSR =: P20_SSR

    In the affected elements, I have fixed Type of selection to the 'item (s)"and the value of the Item (s) for 'P20_GVP, P20_DIR, P20_MGR.

    Dynamic action works fine for the display of the page (that is, when I select a sales representative in the selection list dynamic action properly updated only display value fields three).  This page is a form in which the user submits information relating to the rep.  When the page is sent, all fields are filled in a new record of DB with the exception of three that were populated dynamically above.  These fields get the values NULL.

    When the dynamic action updates the values in the three fields is - it does not set the value of session?  Why these fields don't are not taken into account in the submit other ideas > process Page?

    I use 5 APEX with Chrome on Mac (Yosemite).

    Thanks for the note.  I didn't only display the items could not be used in this way.  I think I'll take a different approach with the design; given that the org structure is in another table that I can simply refer to that by rep when necessary rather than saving the information uploaded to the page of the form.  The reason why I have not fill the screen only the points of loading the page is because I don't know what the values should be until the user selects a sales representative in the selection list.

    I'll change the design to one of the following:

    1) change the display only items of standard text field.  NOTE: if I make the text read-only field that causes other problems when loading (I get the message "violation of protection Session state").

    OR

    2) do not include org structure in the download folder and just refer to table org Rep when necessary.

    Thank you!

    Steve

  • Tabular form and the value of the element

    Hello people:

    I certainly hope that your holidays are festive.

    I have a question for you.

    I have a tabular form which is filled, based on a list of selection (with the type of delivery).  I placed a form on the same page (based on a table), and I would for a question to be filled as well following the list of selection even completing the tabular form.  What is the best way to go about this?  Calculation?  I'm not sure how to do this...

    Thanks for your help!

    Aqua

    AquaNX4 wrote:

    I have a tabular form which is filled, based on a list of selection (with the type of delivery).  I placed a form on the same page (based on a table), and I would for a question to be filled as well following the list of selection even completing the tabular form.  What is the best way to go about this?  Calculation?  I'm not sure how to do this...

    If the selection list submits the page then you can set the value of the element using a calculation after the presents. Make sure that it will not be reset by any statement of process or branch of State later clear session.

  • The default value for the elements of the page get ready when the session is disabled

    Hello

    I am facing this problem, do not know how to solve this problem. Basically, the default value 'elements' on the page don't prepare you when the session is disabled and I visit the page for the first time. So when I check the session for the first time, all page elements are null. But when I revisit the page, page elements sometimes gets.

    Don't know what I'm missing here... Someone has encountered this problem before?

    Thanks in advance! Kindly let me know if you need more clarification.

    Is there a way that the page element can be defined at the time the page is loaded for the first time?

    Yes. Create a "Page Rendering" PL/SQL process. That it is very early in the page rendering (i.e. "on charge ‑‑ after Header"). Set the value of the element of page here:

    BEGIN
      :P10_MY_ITEM := 15;
    END;
    
  • Apex. Submit in javascript do not set a value for the element

    Hi all
    I work with Application Express 4.1.1.00.23.

    I am trying to use this
    apex.submit({request:parRequest,set:{'P30_SELECTED_ROW_ID':parID},showWait:true});
    in order to assign a different value to P30_SELECTED_ROW_ID, and depending on demand, run the processes corresponding, but even if the beginning of the process correctly the value of the element sucks.

    I also try to call the apex.submit using a javascript function to check the parameters passed and the value of Thierry is correct and NON NULL .

    Thanks in advance for any help or suggestion.
    Alex

    Hello

    article P1_SELECTED_ROW_ID is about to "view only".
    If you replace this 'hidden' and unprotected, it should work.

    But because of the check constraint DEMO_CUST_CREDIT_LIMIT_MAX credit_limit<= 5000="" there="" will="" be="" an="" error="">

    Good luck, Erik-jan

  • How to get the value of the element of choice of message in application of process?

    Hello

    In the method of application of the process of the page controller
    I need to get the value of the element of choice of message on the page and then pass the value to am method to call a vo query that requires message value as parameter choice
    I tried

    Weekend OAMessageChoiceBean = (OAMessageChoiceBean) webBean.findChildRecursive ("WkEndList");
    If (weekend! = null)
    System.out.println ("sag down:" + weekend.getValue (pageContext));

    am.invokeMethod ("initQuery", end of week);


    but I'm getting null for the value of the weekend, although the page is shows the values in the drop down.


    Help, please.

    Thank you Gyan,

    I mentioned to use PPR only when the call must be made immediately after the selection of the value.

    If you are looking for value without preconditions,
    GYAN suggested use String WkEndListValue = (String) pageContext.getParameter ("WkEndList");
    You should get the value.

    Thank you

    With respect,
    Kali.
    OSSI.

Maybe you are looking for

  • Update crashes at 8 min. To complete

    EL Capitan 10.11.5 update reboot hangs at 8 min. This is an iMac of 2013 end update since 10.11.4. It was at this point for about 20 minutes. I would like advice on how to proceed, ideally without making a Time Machine restore. Thank you John

  • How to connect his computer without HDM to Toshiba 40LV933G

    Hello I have a Dimension 5150 desctop computer and want to connect to my Toshiba 40LV933G TV. The computer has no HDMI output.I am able to get the help of VGA video cables. But I'm not able to get sound.I tried Mini RCA cable but still no sound. (cab

  • Tecra A9: Bios and turn on the password won't save

    Hello I have problems affecting a power and a Bios password on password on this laptop.Whenever I get a password it will not save him. Anyone able to help?Thank you

  • Activate product key Dell latitude E6410

    OK, I have a Dell Latitude e6410 when I got it, it came with the hard drive has failed I replace the hard drive and a friend of mine who fixed it for put me Windows 7 Professional on there but any way or another I messed up windows if bad, it would n

  • Messaging clients managing media queries?

    Messaging clients managing media queries?