on ‎2007 May 24 5:57 PM
Hi,
Can someone please tell me what function we need to use to check for the last row in an xml file. I need to do some action only if it reaches the last row.
i tried using
<b>if( XmlLoader_XmlContent{/Row/Row/Column1[last()]} , true, false )</b>
but it does'nt give me the required result.
Thanks in Advance
Regards
Muzammil
Request clarification before answering.
Muzammii,
What exactly are your checking for in the last row? Do you want to compare a node value in the last row with another property in your transaction? To best assist you, can you please elaborate what you would like to accomplish?
Thanks,
Michael Teti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
I think i got it . i can make use of <b>currentItem</b> value and <b>itemcount</b> value of repeater.
Actually i need to get the <b>cumulative</b> value from the rows from xml file and need to update the final value(Added value) into SAP R/3. Updating into R/3 should be done only once and that too only after adding all the rows.
But now i think it can be better done with currentItem and Item Count.
Thanks for your instant response.
If any other easier way is there, please let me knw
Regards
Muzammil
The fastest and best way is no to use a repeater, but to use the aggregator action.
Simply feed the aggregator action with /Rowsets/Rowset/Row/ColumnName, where ColumnName is the name of the column you wish to add up. Aggregator will provide you a count, total, minimum, maximum, average, and standard deviation.
Also, the XPath for the "last" or "not last" rows would be:
/Rowsets/Rowset/Row[position() = last()]
or
/Rowsets/Rowset/Row[position() != last()]
Best regards,
Rick
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.