on ‎2007 Sep 19 7:02 PM
hi,
i am using a document action block inside a while loop and trying to update some rows of values in document..my question is whether the document entries will be still available in the furthur iteration of the while loop or it will be refreshed for each new iteration.....
thanks
karthick
Request clarification before answering.
You should have the Document Action Block Outside of the while loop. each Iteration of the While loop will initialize the Document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Karthick,
You can easily use xpath in assignment links to update row values in an xml document. It will effectively work like absolute positioning, so assigning a link to your document object with ...Results{/Rowsets/Rowset/Row[1]/ColumnName} will update the ColumnName value for only the first row (Note: you will have to manually edit the Target XPath to add the [1] after you select the path to the ColumnName in the link editor window).
Reference the help docs for dynamic links as this will allow you to incorporate aspects to your xpath like [#Repeater_0.CurrentItem#] instead of a hard coded number like [1].
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Karthik
Better use the <b>Repeater</b> Action Block instead of <b>While Loop</b> Action Block since Repeater action takes the XML Results and loop the results row by row if and only if XPath Target of Repeater is set to the row of XML results. Inside this Repeater, use <b>Row</b> action to append rows one by one to the XML Document.
Of course, <b>It is recommended that XML Document Action block should be always put outside and before Repeater Action</b>, otherwise, u can not update(append) the rows to the XML document while looping (Repeater).
But <b>While Loop</b> Action is used to perform a specified set of actions until a condition is met, or the max iterations count has been reached. All the actions that directly descend from the While Loop action will be executed for each iteration. You must set the Break property to true, or 1, to stop the loop.
Regards
Som
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| 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.