Get entity by ID

How to display the latest entry from data service in UiPath studio as variable? And how to convert data service entity type to a variable?

@Aditi_Jha

Get entity records will help you get into variable…

Cheers

there is no activity such as “get entity records”

@Aditi_Jha

Exact name is query entity records

Cheers

how to fetch the last entry from data service entity?

the entity record returns list of entity types. how to convert it into a variable?

@Aditi_Jha

List of entitiesis the variable type

To get latest order the records by creationdate

Cheers

the query entty record activity returns the output as “list ”. How to convert it into a variable and get the latest value form the list?

@Aditi_Jha

listvar.First will give the latest value…as the sroting is already based on creationtime …the first record will be the latest

cheers

it gives me “entityName.entityName”. Do i need to convert to data table as well?

@Aditi_Jha

you dont need to convert or anything

its a single entity

signlevariable = listvar.First

if you do singlevariable. then you would see all column names and you can get any entity column value for that record

cheers


can you please check the logs.

@Aditi_Jha

name.first will give full entity…as youa re using log message it is showing the type of variable…

you need to use the columnn ame or id after that

use below in log

name.first.ID this will id of the record, similarly you can get all other columns also

cheers

yes, working now. Thank you so much

1 Like

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