How to convert ienumerable<queueItem> to datatable

I use Get Queue Item to get info from Orchestrator . I got output type ienumerable How can i convert it to DataTable

@ziad.adnan.nasif

Build a datatablew ith required columns using build data table activity

Use for loop and loop ieum and change the type argument to queueitem

then inside the loop use add data row and add each data you need

Currentitem.SpecificContent("Name").ToString

cheers

It skips the loop without giving an error


image

We assume that get Queue Item->s is used

here we would recommend to specify what is needed. QueueItems Properties e.g. Reference, Status,… SpecificContent infos

Example: All SpecificContent Dictionaries to DataTable

Assign Activity:
dtData =

JArray.FromObject(YourGetQueueItemsOut.Select(Function (x) x.SpecificContent).toArray).toObject(Of DataTable)

5 Likes

It worked well. Thank you @ppr

Perfect, Once the final testing is done just close the topic by:
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.