Transpose a collection containing collection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-08-20 04:26 PM
Is there a way to transpose this data structure or it has to be only text for the individual columns?
------------------------------
Pankaj Walia
Architect
Wipro
America/New_York
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-08-20 09:22 AM
Column1 Column2
FirstName Pankaj
LastName Walia
Company Wipro
FirstName LastName Company
Pankaj Walia Wipro
The Transpose action was not written to handle nested collections. I'm sure there will be a way to do what you want, but you need to define how the nested data structure is to be transformed into the desire result.
------------------------------
John Carter
Professional Services
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-08-20 03:31 PM
If I then change the collection to all text fields transpose works . Does it mean if any of the data items in a collection is another "collection" it wont work?
Here is my real challenge - I need to read the field names of a collection dynamically, which is why I was trying to use Transpose.
Since transpose wont work - Got all the collection fields using the action in 'Get collection fields" , then i try to use from the calculation stage to read the value of the field (e.g. Table name.Field name ) , which also is not working if i use dynamic values for the Field name.
Please let me know how this can be done.
Thanks.
------------------------------
Pankaj Walia
Architect
Wipro
America/New_York
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-08-20 06:57 PM
Does it mean if any of the data items in a collection is another "collection" it wont work? Correct, the transpose function isn't built to work with nested collections. If you take a look in the code stage within the utility VBO, you can see it's a pretty basic function.
not working if i use dynamic values for the Field name You can't dynamically reference a collection field by constructing an expression in a Calc.
It sounds like you may need to create a bespoke code stage that can flatten your '2D' input into a '1D' output.
------------------------------
John Carter
Professional Services
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-11-20 09:26 AM
Hi Pankaj Walia!
Did you find a solution to this issue? I'm struggling with the exact same thing.
------------------------------
Alexander Webb
Automation Engineer
Ren Røros Intelligent Automation
Europe/Trondheim
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-11-20 03:47 PM
Is there a reason you're trying to transpose a collection containing a collection? If you give an example of what you're trying to do, perhaps someone could offer another solution.
------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-11-20 08:17 AM
I discussed this with my colleague and found a solution.
We ended up using utility to get field names in a collection, then loop through all the field names and using them as a variable to a custom C# object where we extract collection from collection. Once we have the collection we can append them to eachother and get a proper table with all the values.
The background for this was that we got nested collections from an API and needed to handle the data. The issue was that we could get a collection containing two anywhere from 0 collections to 50 collections, without knowing the names.
Anyways, we figured it out.
------------------------------
Alexander Webb
Automation Engineer
Ren Røros Intelligent Automation
Europe/Trondheim
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-08-21 06:00 PM
I am also facing the same issue.
Could you please share the Code which helped you resolving this issue and provide the steps to resolve it?
Thanks in advance.
--------------
Aman Jangid
--------------
------------------------------
Aman Jangid
Configuration Analyst
Fidelity International
Europe/London
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-09-21 06:03 PM
------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-05-24 08:38 PM
Hi! I have a question, were you able to solve that challenge? I have exactly the same problem as you mention here.
