Could someone think of the logic that requires grouping of data based on ID. i have a scenerio that involves retrieving of data from DB, group it based on Group_ID and publish to a file share.
For example: If you look at the following table, I got to group data that has the same Group_ID (which is “1” in the following instance that has repeated thrice and so, have to group those three records into a single XML document)
Group_ID | Group_Name | Date | xmldata
1 | XYZ | 071905 | JHKJKJH
1 | XYZ | 071805 | KJHKJHH
2 | ABC | 010504 | KKJLHJLK
1 | XYZ | 070502 | KHKJHKJH
3 | MNU | 050502 | KJJHKHKJ
i was trying to implement it something like this:
*Get the data using a SP call
*Loop through the records
*Append the records if they have same Group_ID (using AppendToDocList)
*Convert the document to a String
*Publish to a file share
but i got stuck in step 3 (tried solving it with Branch, Repeat etc., but didnt help…got confused on how to check if multiple records have the same ID).
Any thoughts will be greatly appreciated.