Update process variable (XML) to help set the value

Hello

I'm having a problem to update the value in the variable XML using SetValue (by the XPATH expression). It is removing my original XML and replacing it with a new one. I'm off clue why this happens.

My steps:
1. I created a variable of XML type and set it as a STARTER, REQUIRED.

xmlData.jpg

2. I am updating this variable using the activity set the value. In my process, it is "locUpdate1".

setVal.jpg

The original XML is: (xmlData value)

<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:dd="http://ns.adobe.com/data-description/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" timeStamp="2011-01-03T07:31:26Z" uuid="009257fd-3f66-449d-b554-6a095f917b74">
<xfa:datasets>
        <xfa:data>
            <GetUserRoot>
                <applicantInformation>
                    <UserInfo>
                        <UserID1/>
                        <UserName1/>
                        <UserID2/>
                        <UserName2/>
                        <UserID3/>
                        <UserName3/>
                        <CurrentUserID>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</CurrentUserID>
                        <CurrentUserName>Sarah Rose</CurrentUserName>
                    </UserInfo>
                </applicantInformation>
                <FSTARGETURL_/>
            </GetUserRoot>
        </xfa:data>
        <dd:dataDescription dd:name="GetUserRoot">
            <GetUserRoot>
                <applicantInformation>
                    <UserInfo>
                        <UserID1/>
                        <UserName1/>
                        <UserID2/>
                        <UserName2/>
                        <UserID3/>
                        <UserName3/>
                        <CurrentUserName/>
                        <CurrentUserID/>
                    </UserInfo>
                </applicantInformation>
            </GetUserRoot>
        </dd:dataDescription>
    </xfa:datasets>
<pdf xmlns="http://ns.adobe.com/xdp/pdf/" href="-4608764380271080676-28"/>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
        <annots/>
    </xfdf>
</xdp:xdp>

After operating, it evolves to

<GetUserRoot>
    <applicantInformation>
        <UserInfo/>
    </applicantInformation>
</GetUserRoot>

should not be done.

I want to just copy the value of the an element in the other.

/process_data/xmlData/GetUserRoot/applicantInformation/UserInfo/UserID1 = /process_data/xmlData/GetUserRoot/applicantInformation/UserInfo/CurrentUserID

Output should be:

<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:dd="http://ns.adobe.com/data-description/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" timeStamp="2011-01-03T07:31:26Z" uuid="009257fd-3f66-449d-b554-6a095f917b74">
<xfa:datasets>
        <xfa:data>
            <GetUserRoot>
                <applicantInformation>
                    <UserInfo>
                        <UserID1>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</UserID1>
                        <UserName1>Sarah Rose</UserName1>
                        <UserID2/>
                        <UserName2/>    
                        <UserID3/>
                        <UserName3/>
                        <!-- this is to be coiped in above -->
                        <CurrentUserID>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</CurrentUserID>
                        <CurrentUserName>Sarah Rose</CurrentUserName>
                    </UserInfo>
                </applicantInformation>
                <FSTARGETURL_/>
            </GetUserRoot>
        </xfa:data>
        <dd:dataDescription dd:name="GetUserRoot">
            <GetUserRoot>
                <applicantInformation>
                    <UserInfo>
                        <UserID1/>
                        <UserName1/>
                        <UserID2/>
                        <UserName2/>
                        <UserID3/>
                        <UserName3/>
                        <CurrentUserName/>
                        <CurrentUserID/>
                    </UserInfo>
                </applicantInformation>
            </GetUserRoot>
        </dd:dataDescription>
    </xfa:datasets>
<pdf xmlns="http://ns.adobe.com/xdp/pdf/" href="-4608764380271080676-28"/>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
        <annots/>
    </xfdf>
</xdp:xdp>

Any help to what I'm doing wrong.

Thank you.

-

Afonso

Your mission is incorrect. Note that you need to reference all the XML nodes (to the right of the ROOT node)

Since your reference node is not absolute, it will create the nodes that you have defined in your expression on the left.

The following code should work as expected!

/process_data/xmlData/xdp/datasets/data/GetUserRoot/applicantInformation/UserInfo/UserID1 = /process_data/xmlData/xdp/datasets/data/GetUserRoot/applicantInformation/UserInfo/CurrentUserID

Nith

Tags: Adobe LiveCycle

Similar Questions

  • How to set the value of the point of application using pl/sql in the application process

    Hi guys,.

    I want a global variable (application point) whose value will be set to start when a user logs on to the application. The value will be retrieved from the database by using a sql query. I don't exactly know the syntax to set the value of the point of application in the application process. Also, I want to know what type of enforcement process should I use to set the value of the point of application, when a user starts a session. The value of the point of application varies from one user to the user.

    Help, please.

    I use apex 4.2

    Kind regards

    Waqas

    You can use the application element as a link with his name. That is to say. your point of application is named G_MY_APPLICATION_ITEM, then you can / set of access using: G_MY_APPLICATION_ITEM.

    For example

    BEGIN

    -assign as a variable

    : G_MY_APPLICATION_ITEM: = 'LARRY ';

    --

    -use in a SQL statement

    SELECT WHATEVER_COLUMN

    IN: G_MY_APPLICATION_ITEM

    FROM MY_TABLE

    WHERE USERNAME =: APP_USER

    ;

    END;

    Peter

  • HOW TO SET THE VALUE TO A PAGE OF AJAX ON DEMMAND PROCESS ELEMENT?

    Hi, I have a javascript that calls an ajax on demmand process , and I need a the ajax process variable value is updated about my page: P2_CONTENT:

    • Here's my javascript call:

    doprint() function

    {

    Apex. Server.Process ("GENTICKET", {pageItems: "#P2_PARAM1"}, {async: false});

    }

    • and here is My ajax on demmand process (GENTICKET):

    BEGIN

    declare

    CONT varchar2 (1000); -the return value is less than this length, I have already checked in my table-

    Start

    Here, I call a DB procedure that fills my data. I verifyed and works nice!

    pro_generate (:P2_PARAM1);


    Here, I select the data obtained in the previous step

    Select tic_text

    in cont

    of t_reim

    WHERE f_type =:P2_PARAM1 ;



    Here, I need to set the value to display in my page field


    APEX_UTIL. SET_SESSION_STATE ('P2_CONTENT', CONT);  -< < < < < that doesn't work. I tried: P2_CONTENT: = cont; but does not


    end;

    END;


    Thanks in advance for the help.

    You can do all this declaratively by using dynamic actions, to try jQuery is like trying to swim before you can float.

    You can influence the value returned from JavaScript with this PL/SQL:

    HTP. PRN (cont);

    Then include a function of success (as described in the previous link) to run code like:

    success: function {(pData)

    $s ('P2_CONTENT', pData);

    }

  • How to set the value of a variable in automator?

    I'm totally new to automator I found a post that I try to reuse

    to Re: copy multiple files from TextEdit in one Word file

    I want to open a series of html files in a folder and convert in a TextEdit rtf file.

    However, I am unable to automator find out how set the value of a variable such that it appears in this post

    I looked at every command in library without a lot of fortune

    Any help?

    Thank you

    Dan

    Its in Utilities.

    In Automator, use the search box:

  • How to set the value of a * APPLICATION * with apex.server.process?

    If I have a page named point P1_MY_PAGE_ITEM, I could put its value in the session by doing this:

    $s('P1_MY_PAGE_ITEM', 'I Like Pie!');
    
    apex.server.process(   'dummy'
                           , { pageItems: "#P1_MY_PAGE_ITEM" }
                           , { dataType: "text",
                             async: false,
                               complete: function( ajaxResponse )
                                     {
                                          var ignoredReturn = ajaxResponse.responseText;
                                     }
                             });

    Which works very well. If you check the session, the P1_MY_PAGE_ITEM will now have the value: I like pie!

    However, if I have an Application element (not a page element!) named MY_APP_ITEM, how could I do the same thing? How can I use apex.server.process to set the value of MY_APP_ITEM in the session? I wouldn't be able to use "pageItems" because MY_APP_ITEM is not a page element, it is a part of the application.

    What is the correct syntax to do this?

    Thank you

    -Joe

    Hey Joe,

    Returning to that thread you made a couple of months ago, the answer is here:

    Post adjustment Application items in the apex.server.process for a * process application *.

    Defining a point of application is as easy as providing the name of the application element to p_arg_names Bay and set a corresponding value in the p_arg_values table.

    For example, in an application with article SOME_ITEM of the application, I can put the value as follows:

    (function(){
    var arrNames = [], arrValues = [];
    arrNames.push("SOME_ITEM");
    arrValues.push('some value');
    apex.server.process(   'dummy'
                         , { p_arg_names: arrNames, p_arg_values: arrValues }
                         , { dataType: "text"
                           });
    })()
    

    Any required application process. Should the item be free that you set it from the browser.

  • How to set the value of QUERY using PL/SQL process?

    Hello

    I use APEX 4.2...
    How to set the value of the REQUEST using process of PL/SQL which lies before the header - where the value of the REQUEST should appear on the URL?

    Kind regards
    Fateh

    You cannot set a value of demand in a PL/SQL block. You can run a PL/SQL block on a request which is the id of a button for example.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to set the value of the xml node.

    Hello

    I have the PDF application can be entered by the user using the key. When sending

    I use following code to set the value of the xml node.

    XFA. Data.assignnode ("Employee.ID", "123", 0):

    If its generators of xml as below.

    < employee >.

    < id > 123 / < ID >.

    < / name >

    < / employee >

    Now, I need to generate xml as below.

    < employee id = '123' >

    < / name >

    < / employee >

    So, how together create the id of node as above?

    Thanks in advance.

    Kind regards

    Dhiyane

    Hi Dhiyane,

    You must set contains the property if the node id to "metadata", i.e.;

    xfa.data.assignNode ("employee.id", "123", 0);
    XFA. Data.Employee.ID.Contains = 'metadata ';

    Very awkward, if you have a number of them, in which case you might want to look at using E4X.

    Good luck

    Bruce

  • Online store 1.0 - what process set the value of the App "FULLNAME".

    Hello

    I'm just very curious to know what process set the value of the App "FULLNAME" ini the Apex application packaged - element 1.0 store online.

    In the Navigation bar, there is an entry named "If you're not & FULLNAME, click here | However I can't find how the app defined this value point of application in all process when login.


    no idea, I will be very appreciated.

    Thanks in advance.

    PPMonkey

    Check the authentication process after the current authentication scheme and the call to ols_getname.

    Scott

  • Set the value with XPath dynamically

    Dear all,

    I am wonder if what follows is possiable with service set the value using XPath, * simple * workaround is also welcome.

    If I have a variable myXML =

    < root >

    < item region "A" = > 1 < / item >
    < item region = "Two" > 2 < / item >

    < / root >

    I can refer to /root/item [1] by:

    Set /process/@myNum = 1

    Set /process/@dummy = / process_data/myXml/root/item [number (\process\@myNum)]


    [' But how can I access to /root/item[@region="One '] ?

    I tried the following, but all have failed:

    1)

    Set /process/@myString = @region = "One"

    Set /process/@dummy = / process_data/myXml/root/item [string (\process\@myString)]

    2)

    Set /process/@myString = a

    [Set /process/@dummy = /process_data/myXml/root/item[@region='string (\process\@myString)']

    And is there a way to set a variable using the pattern string? (that is, you name is {$/process/@yourName$})

    Concerning

    Bill

    Bill,

    I created 2 simple samples that I enclose the answer as one. File ACL.

    First to get the value of a node using an attribute, what you need to do is create a variable that will contain the dynamic data - in your case, the value of the region. Then create another variable that you receive the value of the desired XMl element - I called mine 'value '. If your setValue would look like this:

    The location expression

    /process_data/@region "One"

    /process_data/@value process_data/xmlIn/root/item[@region=/process_data/@region]

    As you can see, there is no need to use the string() function, because by default, while XML is a string. This is precisely why you should use the number() function when trying to identify an item by its index. Index must be a number, not a string.

    Second, about the value of model with xPath. I created an example of process of e-mail to demonstrate this solution. You are on the right track, it's just that your syntax is incorrect. You have:

    Your name is {$process/@yourName$}

    It should be:

    Your name is {$/ process_data/@yourName$}

  • is there a better way to set the value?

    It is a very simple application. Here's what I'm trying to accomplish:

    I click on the 'new order' button on page 1, and it takes me 10 page. In the meantime a new empty order is created. order_id is stored in the application element.

    Page 10, I click on 'choose the customer', and takes me to page 11, where I have a list of customers (a report), and by opting for a client (link column), p10_customer_id is defined, and the application navigates back to page 10.

    On page 10, there is a process of page that fires whenever the page is displayed (if order_id is not null), and update the orders table by setting the value of the item p10_customer_id the customer_id.

    What I want is simple: create a command, set the customer_id (and possibly settle the customer_id again if the user wants to change).

    It works now, but I don't like that the customer_id is updated each time this page is rendered. Simply put the customer_id of page 11 only, when the user selects a customer in the list.

    But I have not found a way to do it.

    Also, it would be good to create all of the order, the customer id, order items all in one transaction and post them right at the end, but I did see a way to not make any changes on a page when I navigate to another page. Because now, if something unexpected occurs, for example the user does not complete the order (navigates away, or closes the browser), the orders table will be almost completely empty, unused lines

    I use Oracle10g XE and Apex 3.1.2

    Thank you
    Gabor

    Hi Gee2,

    Have you checked how the collections of the apex? In my opinion, you can create an application of the cleaning by using this technique.
    There is a demand to make orders, created by default when you install APEX. Check the app.

    I hope this helps.
    Kind regards

    --
    Paulo Vale
    http://Apex-notes.blogspot.com

  • 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

  • How to set the value of adjecent record

    Hello

    For an interactive report, I wanted to know, how set the value for one of the value column taken recording (the visible record in the report) adjecent to the same column in the current record.    The reason behind this requirement is, the table contains cirtain ID which is populated based on cirtain condition.  And the same ID must be set to adjecent different records.  Since this is event based on human evaluation of the data, I can not run the UPDATE command in the background.

    To simplify the requirement, suppose, report IR on the employee.  Based on the user, click one of the dummy 'comlumn link', the value COMMISSION_PERCENT must be copied to the next record.  If I know EMPLOYEE_ID value of the next record, then update SQL will do the job.  But how?

    Thank you

    -Anand

    Hi Anand,

    Please check the sample application you gave, I created the same according to your requirement.

    Here are the steps that I did.

    1. edition your column that you use as a button.

    A class has been added to this button under link attributes

    class="uButton cpycomm" role="button"
    

    URL: javascript:void (0);

    2. edited Page attributes

    Under run when the Page loads

     $("a.cpycomm").click(function(){
        var $el = $(this);
        var nextemp = $el.closest("tr").next().find('td[headers="C725254625175515007"]').text();
        var comm = $el.closest("tr").find('td[headers="C725255480705515009"]').text();
        $("#P1_EMPNO").val(nextemp);
        $("#P1_COMM").val(comm);
    
        if (confirm('Copy Commission to next record ?')) {
           apex.submit('SAVE');
        }
      });
    

    3. a process page to update the commision has created.

    Kind regards

    Jitendra

  • Set the values in cascade LOV (Skillbuilders SuperLOV used)

    Hello

    I install a simple page with a SuperLOV cascading.

    I'm trying to set the values of the first and the second SuperLOV based on the selection of a report.

    After the selection, a javascript function is called that sets the variable state and browser session P1_EMPNO

    function editRecord(pValue) {
       //set session state of P1_EMPNO to use in pl/sql query
       var a=new htmldb_Get();
       a.add('P1_EMPNO', pValue);
       var r=a.get();
    
       //set variable to trigger dynamic action
       $s('P1_EMPNO',pValue);
    }
    

    I use this point (P1_ITEM) to trigger a dynamic Action (when the value changes AND is not null) to SET the VALUE for the first LOV. This method works.

    Then one created a second dynamic Action that uses the event AFTER REFRESH for the first LOV to SET the VALUE for the second SuperLOV. It does not work

    Just to test the logic, I created a third standard LOV which is the same as the second SuperLOV and respective dynamic action. This one works.

    It's the http://apex.oracle.com/pls/apex/f?p=49044:1 application

    (PATRICK, demoadmin, 1234) application WORDERS.

    I would be very grateful for any help

    Thank you.

    OK, I discovered what was going on.

    I used a $('#P1_EMP').apex_super_lov of javascript for dynamic Action action to set the value of the SuperLOV.

  • How do dynamic actions using work to set the value in all browsers?

    I'm having a problem of incompatibility between browsers with dynamic actions to help to set the value.  Dynamic action works like a charm on Chrome but has no effect on IE or Firefox.  The code in oracle.apex.com and here are the credentials:

    Workspace: DDBA

    Username: [email protected]

    Password: redtruck12

    These codes is on page 3 and here are the details:

    There are two lists of report (Standard and special) and some reports require additional information provided in the lists of selection or text boxes.

    If the user selects a report select Standard requiring a list/text box, then the dynamic action sets the value of the special reports to NULL (and vice versa).

    Dynamic action is to prevent a simultaneous Standard reports and special selection.  To see how it works on Chrome, follow these steps:


    1. Run the Page 3
    2. Select the "Search report" option in the list Report Standard .  A text 'Search criteria' box
    3. Select the option 'Release report' in the list of special reports .  A selection list appears and disappears from the text box 'search criteria '.

    If you do the same on IE or Firefox, the text box does not disappear.

    Hi Edward,.

    Please check page 4 of your app, I made a copy of your page and made a few changes:

    I have set up an example of dynamic action 1 this hanles the report and special report selection list.

    Dynamic action games, select the value of the selection list and he accompanies in detail the report lists to null and then submits the page.

    For this I have deleted the page submit events to the time the report and special report select lists. Instead I handed them a HTML class. The dynamic action is triggered by a change of this category of html.

    When the trigger is the report selection list, select special report is set to null. Also underlying selection sub lists are set to null.

    When the trigger is the special report selection list, the selection of the report is set to null. Also underlying selection sub lists are set to null.

    The two end of the action with a "Send" page to manage the show and hide appropriate items. Note that there is a lag in time due to the submission of the page. As I have suggested, it would be treated better by a refresh of the region. On the other hand you depend on now submit for the continuation of the treatment of your page. With the help of an update of the region would require a work more javascript and cost more redisgn of your page. If you need IE8 support, additional javsascript likely to cause other unexpected behaviors. In other words, a page is maybe in your case probably better then an update of the region after all.

    I checked this page 4, Chrome, Firefox and IE (latest version) and I get the same behavior in all browsers.

    Kind regards

    Vincent

    http://vincentdeelen.blogspot.com

  • LOV cascading does not work when you set the value of the parent LOV with DA

    Hi all

    Using APEX 4.2.2.

    I have tow LOVs

    LOV parent article is: P50_TYPE

    Child element LOV is: P50_PROJECT_ID

    In other words in the attributes of the element P50_PROJECT_ID, we have:

    > Cascade LOV Parent article (s): P50_TYPE

    > The items to show page: P50_TYPE

    > The list of values definition: something similar to:

    Select * from mytable where type =: P50_TYPE

    I use DA as run of the JS code to set the value of the P50_TYPE element

    something similar to:

    > $('#P50_TYPE').val (2);

    After doing this, the P50_PROJECT_ID element does not get updated when the P50_TYPE value changes. Namely, P50_PROJECT_ID remains empty, unless the end user manually changes the value of P50_TYPE.

    Any help please?

    Kind regards

    I had a similar experience, he expected a change event, so you can extend the jQuery to be included

    $('#P50_TYPE').val (2) .changes ();

Maybe you are looking for