Loop for with a variable counter in xquery in OSB

I have xml. I compare the value of the PRIMARYID field in each node, and if it's the same, it should be updated ClaimID field with other even value, it should not get updated. Can someone tell me how to do this in OSB. Thank you.

< InputParameters >

< choice >

< > 12 ClaimID < / ClaimID >

< FACILITYID > 123456 < / FACILITYID >

< > 1234 PRIMARYID < / PRIMARYID >

< / choice >

< choice >

< ClaimID > 13 < / ClaimID >

< FACILITYID > 123456 < / FACILITYID >

< > 1234 PRIMARYID < / PRIMARYID >

< / choice >

< choice >

< > 14 ClaimID < / ClaimID >

< FACILITYID > 123456 < / FACILITYID >

< > 2345 PRIMARYID < / PRIMARYID >

< / choice >

< choice >

< > 15 ClaimID < / ClaimID >

< FACILITYID > 123456 < / FACILITYID >

< > 2345 PRIMARYID < / PRIMARYID >

< / choice >

< / InputParameters (InputParameters) >

Something like this might work:

Let the $input: =.

12

123456

1234

13

123456

1234

14

123456

2345

15

123456

2345

return

{

for $choice in the $input / choice

Let $withSamePrimaryID: = the $input / choice [PRIMARYID eq $choice/PRIMARYID]

Let $claimID: = $withSamePrimaryID [1] / ClaimID

return

{$claimID} {$choice/FACILITYID} {$choice/PRIMARYID}

}

Tags: Fusion Middleware

Similar Questions

  • "Partition for ' with a variable binding

    Does anyone know if a variable binding can be used with the syntax ' score for "? For example,.
    select max(col1) into myvar from t partition for (mydate);
    where t is a range-partitioned table.

    I couldn't find any documentation specifically about this and all the ways I have tried do not have :-(


    Edit: version 11.2

    >
    Is the 'for' typo?
    >

    It seems to be a valid syntax of 11.2.

    The SQL reference does that bind variables cannot be used in the partition for clause. Look for partition_extended_name and you will find a section "restrictions on scope names.

    Kind regards
    Bob

  • Loop form with GET variables!

    Hi all!

    I need to retrieve all the names of variables that are used in the form.

    Although I was able to extract the names of the variables of the form using the POST method, but I am unable to get it using the GET method.

    Here is the code



    The code above works for the POST method only...

    When I change the action of the form to GET, it shows nothing.


    Thanks for your time.

    Thanks Kronin. URL.varname worked.
    Thanks a lot, man.

    Dan I'll check yours too.

    Thank you guys!

  • Help with the efficiency of the program, stop a loop for?

    Hi all

    I need some advice programming General to help my VI to operate more effectively.  I have a table in which the program runs each point and 2d compares the value for the surrounding points.  The user can select the range of cells to inspect range, so if the user selects 1, then, it will compare the point (0,0) to all cells in a single cell.  If the user selects 2, then all the cells in a range of cells 2 and so on.  If the point (0,0) is superior to everything around him, then he writes this point in a table.

    I made more notes in the VI to explain what is happening, but I think that the program would be more effective if I could stop a for loop to run as soon as it detects a false condition, i.e. the point (0,0) is not more than one of the surrounding points.  As it is right now, it compares at all points around him, writing TRUE/FALSE for a table, then checks if all conditions are TRUE.  That takes a lot of time if the user selects a value of 8, for example.  It would reduce a lot of processing time if he just threw to the next point as soon as it finds a FALSE condition.

    Any other advice would be appreciated as well.  Try to be a more effective programmer!

    Thank you!
    Alex

    I do not attach the data file, because it is too big.

    In versions before the invention of the loop For with conditional stay terminal, you can do it, but you have over what a while loop to stop when your condition is True, OR when the terminal i is equal to the size of the incoming array - 1.

  • loop for and while loop with empty table entry

    Hello

    I have a question with loop and loop.

    When a constant empty array (zero element) is connected to the loop For with "allowing the index", there are no interactions performed in loop For. But, if the loop is replaced by any loop, no problem.

    LabVIEW 2010

    Hello

    It is ok. I have no problem at all.

    For the 'loop' For when you connect the table thanks to indexing, the number of iterations is set to the size of the array. The iteration number assigned to N (in your case 10) is ignored.

    For the 'While' loop the number of iteration is defined by the Boolean Condition and the size of the array is ignored.

    Paul

  • go to the next iteration of loop for and continue execution of the previous iteration

    Hello everyone,

    I want to run a loop with an offset to each iteration. I explain: I want to run a task multiple times (for loop), but with a variable delay in each iteration.

    Thus, if we put t = 0 before you run the loop and I use 3 iterations. I put a writ of execution to the first ieration after 3 sec then skip to the next iteration of course without waiting the end of the previous iteration and run the current iteration after 1.5 s and go to the third ieration (once again without waiting for the latest iteration).

    I conclude: this is a simultaneous execution of a for loop (10 to 50) from different eras (variable time between t = 0 and each running of each task.

    The problem I found in the loop is the fact that I have to wait the end of the time delay in each iteration bfore going on to the next.

    Best regards

    In all languages, a loop iteration FOR happens AFTER previous.  However, go with the parallelized FOR loop can happen to you.

  • Is it possible to execute a loop For independently within a while loop in LabVIEW 2013?

    In my program, I want to run a loop For inside a while loop and run independently, at their own rate of execution.  A test, I wrote a simple VI with a while loop with 1 second calendar and in this I inserted a loop For with 3 of a second.  I created indicators for the two terminals of the iteration.  When executing the VI, I found the while loop waiting for loop For run N times before the while loop is executed again.  I also found that sometimes the first iteration of the loop For ends at 1 second instead of 3 seconds and the STOP button to complete execution of the While loop does not always work.

    This is the expected behavior. LabVIEW is the language of s DATA stream. If you want the curls to be independent, it can be data forcing addictive so use separate loops.

  • Assign variables with a loop for

    Hi all

    I'm variable loading for a quiz of xml using Ajax:

    $.ajax({)

    type: 'GET ',.

    URL: "loadVars.xml",

    data type: "xml."

    success: {function (xml)}

    The data that I get are the following:

    word1 = $(xml).find('word1').text ();

    word1distracter1 = $(xml).find('word1distracter1').text ();

    word1distracter2 = $(xml).find('word1distracter2').text ();

    word1distracter3 = $(xml).find('word1distracter3').text ();

    There are about 20 words and I want to use a loop for assign variables on both sides of the equation.

    for (var i = 1; i < 20; i ++) {}

    What's the syntax? I tried:

    "word" + i =

    eval("word'+i) =

    etc.

    Any help much appreciated.

    OK found!

    window ["word" + i] = $(xml).find("word"+i).text ();

  • by the way the variable counter between the loops

    I have a question about the passage of a variable counter between different events / while loops and seen an increase in value regardless of the loop is initiated.

    The fundamental problem is that I write file names unique to data collected on a spectrometer, and I would value at the end of the name of the file to increment every time that I collect the data. There are several different ways that I can collect the data, and I'd like the counter to increment when the collections is triggered. The attachment shows essentially what I'm trying to accomplish. Represent it buttons collect two different types of data I collect my instrument, but the counter variable is not passed correctly between the two loops. Is it possible that I can get the incrementing counter so that the two loops read the same value of counter?

    Thanks for your help.

    MICAH

    I can't look at your code since I'm on a phone. But you should really only have / need a structure of the event in a vi. The only exception I can think of is one to manage the events of the user and the other for GUI events. But even in this case there is no reason that I can think to need two.

  • In any case, to use transform activity with a loop for storage of the iterative purpose?

    Hi all


    I have a question about the processing activity. As I am new to BCI, I want to learn more about the processing activity. If we use a transformation inside a loop activity, all other records other than the last ones will be overwritten. I want to avoid this situation and s output

    Scenario of
    -------------------------------

    (1) inside a loop for, I keep a DB adapter that will choose 1 row of table. So in each loop iteration for, we will get a line.

    (2) in the same loop, we maintain another DB adapter which will retrieve multiple records.

    (3) these values, I need to map it to an output variable (output xsd is able to contain multiple records) in the following order.
    < 1Adaptateur out >
    < data1 > < / data1 >
    < data2 > < / data2 >
    < 2 adapter output >
    < data > < / data >
    < data > < / data >
    < / 2 adapter output >

    for example)
    < Person > - 1 adapter Db I st iteration
    < name > xx < / name >
    < 23 > < / Age >
    < address > - 2nd iteration of st adapter 1 DB
    home address < address > < / address >
    address of the < address > < / address >
    permanent address < address > < / address >
    < address >
    < / person >


    < Person > - 1 adapter Db iteration nd II
    yy < name > < / name >
    < 23 > < / Age >
    < address > - 2nd iteration of st adapter 1 DB
    home address < address > < / address >
    address of the < address > < / address >
    permanent address < address > < / address >
    < / book >
    < / person >
    How can I pass the data that we have read from the db adapter in the above format

    Pls suggest a solution for this.

    Published by: user_ds on June 15, 2011 02:38

    Published by: user_ds on June 15, 2011 02:47

    HI'.

    1.) initialize a new variable 'counter' of type int, and assign inside initialize counter = 1
    2.) put the card1 DB and DB map2 invoke the of inside a while loop, then put it
    condition (that you want to use) for the number of times you want to hit the DB again and again
    3.) use affect the activity and inside this use Add and put the [$counter] on the expression of xsl to map to the next node
    4.) now use a beneficiary within an Assign activity where increment you counter + 1

    Yatan-

  • Help with a loop For passing parameters...

    Hello

    I am creating four cubes in Papervision using a loop for. The cube class requires, as the first parameter, a MaterialsList. I created four different MaterialLists in my code with the names materialsList1, materialsList2, materialsList3 and materialsList4. In a loop for, I'm trying to pass these variables as MaterialsList parameter. It does not work. If I use the variables themselves in the code, it works fine, so I know that my problem has something to, with how I'm data, type the dynamic name (see Actionscript below). Can someone please? Thank you!

    The Actionscript code:

    for (var i: int = 1; i < 5; i ++) {}


    var cube: Cube = new Cube like MaterialsList (("materialsList"+i), 396, 40, 494, 8, 8, 8);


    container.addChild (cube);


    Cube.x = i * 430;


    cube.rotationY = 180;


    Cube.Name = "the cube" + i;


    trace (cube. (Name)


    cube.addEventListener (InteractiveScene3DEvent.OBJECT_OVER, objectOverHandler);


    cube.addEventListener (InteractiveScene3DEvent.OBJECT_OUT, objectOutHandler);


    cube.addEventListener (InteractiveScene3DEvent.OBJECT_PRESS, objectDownHandler);


    }

    You are welcome.

    If you're still able, please mark this thread as answered.

  • How to call two variables that are to keep several value in loop for

    Hello

    I have 4 point, two list and two checkbox select. ID and class Section are select list and student id and the id of the object are check .i want to insert more id then a topic in the table corresponding to the student id then a plus.

    for example. When I select the IDs of class 1 and section A then student of class 1 and section has come into student card (checkbox element) and all the object corresponding to the class 1 comes in the object id (item checkbox).

    now I want to insert several selected for what is, multiple student topics in at table when I press submit Button.

    My table is

    CREATE TABLE 'STUDENT_SUBJECT_DETAIL '.
    (NUMBER OF 'S_NO',
    NUMBER OF "STUDENT_ID,"
    VARCHAR2 (50) "SUBJECT_ID",.
    "SESION' VARCHAR2 (50)
    )
    /


    I use this Code

    DECLARE
    STU wwv_flow_global.vc_arr2;
    VOID wwv_flow_global.vc_arr2;

    Start
    STU: = wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
    SUB: = wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
    I'm looping 1.STU.count
    I'm looping 1.SUB.count
    insert into STUDENT_SUBJECT_DETAIL
    values (CLA_SUB_ID_SEQ.nextval, Stu (i), (i) Sub,: p57_SESION);
    end loop;
    end loop;
    END;

    Published by: Ed on November 20, 2009 22:10
    DECLARE
        STU wwv_flow_global.vc_arr2;
        SUB wwv_flow_global.vc_arr2;
    BEGIN
        STU:= wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
        SUB := wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
        FOR i in 1..STU.count LOOP
            FOR i in 1..SUB.count LOOP
                insert into STUDENT_SUBJECT_DETAIL
                values(CLA_SUB_ID_SEQ.nextval,STU(i),SUB(i),:p57_SESION);
            end loop;
        end loop;
    END;
    

    None good for me:

    1. you have 2 loops, and they are both using the variable I as a counter.
    2. your insert must be in the form: insert into table (column names) values (to be inserted)
    3. why not use a trigger to get the nextval in the sequence?

    Trent

    Published by: tr3nton on November 21, 2009 16:16

  • Help please: I can loop for a variable from A to B?

    Hi all

    We use BEEP 11.1.1.6 (build 5.12.110)

    I would use a foreach loop based on a variable, similar to
    - FOR i IN 1..20 LOOP... END LOOP; 
    or
    - WHILE i < 20 LOOP... END LOOP;
    Is this possible?
    What is the correct syntax?

    Thank you very much
    Oliver

    Look at

    
    
    
    

    and output

    1
    2
    3
    4
    5
    
  • How I continuously loop frames with pause for 20 seconds in each image of the scene even without going to the next scene?

    How I continuously loop frames with pause for 20 seconds in each image of the scene even without going to the next scene? There are buttons for other scenes in these images. The below works well until I got to the last frame of the scene, then he goes to the next scene and plays. How can I make one loop continuously.

    Stop();

    var: timer = new Timer (20000,0); / / <--

    timer.addEventListener (TimerEvent.TIMER, timerHandler);

    Timer.Start ();

    function timerHandler(event:TimerEvent):void {}

    this.nextFrame ();

    or if you want to jump for example 5 executives

    this.gotoAndStop(this.currentFrame+5);

    }

    Thanks for any help.

    If you want to stop your timer, use the stop() method:

    Timer.Stop ();

    PS when you use the adobe forums, please check the useful/correct, if there is.

  • Use variables in a loop For

    I am trying to assign the updates fallow of the variables in a loop for

    The problem I have says:
    NS & i
    p + i
    Yes + I

    vSound should work, I think, but I do not know how to declare other variables. Can someone help me please?

    Try:

Maybe you are looking for

  • How do you put bookmarks of one on the other computer?

    I have a new laptop and I want the bookmarks from the old laptop on my new.How do I do that?

  • Contacts will be open on my iPad Air

    I can't open the contacts on my iPad Air

  • My sound is that I'm under water

    When I watch 4oD the sound quality is terrible, it's that I'm under water. I'm on Windows Xp. Any ideas please?

  • FI 6296: Server Ports module extension?

    Hello I have read http://www.Cisco.com/en/us/docs/unified_computing/UCS/SW/CLI/config/Guide/2.0/b_UCSM_CLI_Configuration_Guide_2_0_chapter_0101.PDF Server ports Ports on the server to manage data traffic between the interconnection of fabric and maps

  • game performance

    Okay, so I have hp 15 - n060ca ~ I don't know why my game is so laggy like League of Legends... ~ also my windows explorer on crash and reboot... then now my laptop can ping through cmd sites, but nothing in browsers... Please help... ~