How to manipulate the collection

jassi_123

Member
Hello Team,

I have a collection with Field Name Distribution Lists in which I have the data for Display Name and Managed By as shown below:-

View attachment 1540458524716.png

My requirement is to Separate both these values in different fields I.e:-

Display Name ManagedBy
Test Testuser

Can anyone advised the best way to complete this task.

Regards,
(Jaspreet Singh)
 

VJR

Well-Known Member
You can achieve this by using the Filter and Merge actions.
At first go through the post and analyse if this is the approach you would like to go with due to its caveats.

If the Original Data collection looks like this:
View attachment 1540390689861.png

The output after running the process is as below:
View attachment 1540390355812.png

- Filter the Display Name and the Managed By using Like operator which will return two different collections.
- Since both the filters will return the same column name ie; DistributionLists one of them needs to be renamed so that these two collections can be merged into a single one (as a collection cannot have two columns with the same name).
- Now if you do not want the texts "Display Name" and "Managed By" in the Final Collection then you will need to loop through the collection and replace these texts along with the ":" by an empty string or alternatively capture all the text that is after the ":" sign so that you get the desired text.

Note that the Filtering operation causes the data to show in a different order. You can check the order of the rows in the Original Data collection and the Final Collection. This is by design from Blue Prism and not sure why they have kept it that way. An option for that would be to sort the collection by adding a helper serial number column which can be deleted later as explained in Post #2 here.
 

jassi_123

Member
Thanks VJR,

If possible could you please show how to use the Filter collection option in Collection Maniuplation VBO.

That would be a great help from your end.
 

rsingh40

Member
Hi Jassi,
Give a try like this.
"[Collection Column Name] LIKE '%Display Name%'"

[Collection Column Name] is the collection column name
 

VJR

Well-Known Member
Thanks VJR,

If possible could you please show how to use the Filter collection option in Collection Maniuplation VBO.

That would be a great help from your end.
"DistribtionLists LIKE '" & "Display Name%'"
"DistribtionLists LIKE '" & "Managed By%'"
Test it with the various scenarios of the data you have in the collection.
 
Top