- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-06-22 07:34 AM
------------------------------
pankaj sarak
------------------------------
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-06-22 08:08 AM
You can extend the 'Collection Manipulation' business object by creating a new action named 'Set Column Order' and pass two input arguments, 'Original Collection' (Collection) and 'Column Order Collection' (Collection) having a single column called 'Column Name' of text data type. Based on the order of how you set up all the column names in each row from top to bottom, the columns will get rearranged in the Original Collection. Also set an Output parameter as 'Output Collection' (Collection) for this action as shown below:
Add the code stage and use the below code with the input and out arguments as show:
dim i as Integer
i=0
For Each dr as DataRow in col_order_DT.Rows
origDT.Columns(""+dr(0).ToString()+"").SetOrdinal(i)
i=i+1
Next
ordered_coll=origDT
The run results are as follows:
Input Arguments:
Since, here I have maintained the order of column names (Top To Bottom) as Field3, Field2,Field4 and Field1 hence my output collection will also have the same order
Output Result:
You can publish the action and test the same from Process Studio. Let us know if this helps you out 🙂
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-06-22 08:08 AM
You can extend the 'Collection Manipulation' business object by creating a new action named 'Set Column Order' and pass two input arguments, 'Original Collection' (Collection) and 'Column Order Collection' (Collection) having a single column called 'Column Name' of text data type. Based on the order of how you set up all the column names in each row from top to bottom, the columns will get rearranged in the Original Collection. Also set an Output parameter as 'Output Collection' (Collection) for this action as shown below:
Add the code stage and use the below code with the input and out arguments as show:
dim i as Integer
i=0
For Each dr as DataRow in col_order_DT.Rows
origDT.Columns(""+dr(0).ToString()+"").SetOrdinal(i)
i=i+1
Next
ordered_coll=origDT
The run results are as follows:
Input Arguments:
Since, here I have maintained the order of column names (Top To Bottom) as Field3, Field2,Field4 and Field1 hence my output collection will also have the same order
Output Result:
You can publish the action and test the same from Process Studio. Let us know if this helps you out 🙂
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
