Is there a way to convert the entity records object to a datatable?

I want to read data from an entity in the data service and return the data as a data table. Is there a way to do it with a ready-to-use activity or something?

I know, we could always build a data table with the custom columns, and read the records object with a for each loop, and populate the data table. But since I want to do this across several entities, I am looking for an easier way to do this with a single reusable activity. I looked in the DataServices Package but it does not have any activity like this.
@sudheern ? @Vibhor.Shrivastava @Lahiru.Fernando

1 Like

Hi @savantsa,
How the entity records look like.

Regards,
Arivu

It is a list of the entity. If your entity is called “employee” then it is a list of employees. If the entity is “department”, then it is a list of departments and so on.

hello!
i am also interested to find the answer to this. did you manage to do it?

Welcome to the community @Irina_Butu.

I spent some more time on this topic later and I think the way the uipath data service entities are designed, it does not lend itself to convert them into any other variable, including datatable. Each entity is a data type by itself and that is not a datatable data type. I know it is not convenient and I hope UiPath changes it in the future. What good is a relational database, that cannot be ported to other forms?

1 Like

Hi,

Interested in this, Do we have any latest update?
Thanks in advance for your reply.

@UiPath_Community, Not sure if anyone from UiPath itself got a chance to look into this. So many people are interested in being able to convert an entity into a datatable. Both are after all two dimensional and represent data.

1 Like

Hi everyone,

Try Collection to DataTable activity. This should work with the input like
{YourEntityVariable}

2 Likes

Thanks a lot. It worked perfectly and saved me a lot of time.

I will try this and let you know if I can create a collection from an entity.

1 Like

Hi @hgaber105 ,
Happy to hear you found the solution!

1 Like