How to retrieve specific Entity data

I have a process where i am adding an entity and a value to data service when a submit button is hit, and i need to retrieve the value being created in entity. But I only see create entity record, not retrieve. I know i can use set value but i am unsure how to use that in order to get the value from the entity that was created. my data is like below and i want the TaskReferenceIDNumber

Any help is appreciated. I am just starting with UiPath Apps so learning as i go

image

Hi @david.rya.goderre1

Use the Get Entity record with I’d activity to retrieve the data from the entity.

To know more and clear explanation about it, check the below YouTube video, how to use the entities in uipatu apps,

Hope it helps!!

thanks for this. I watched the video and it is helpful i think. But i am unable to get my values after i click submit. My workflow is this:
A user comes to the app, competes the form fields and clicks submit
on the submit click event i want to create a entity data record, and then after retrieve the taskreferenceIDnumber that is created and display it to the user. When i set this up it doesnt have a value because i do not know how to write the vb to fetch the most recent value. Thats at least my guess as to why i cant get the values. The video is already using stored values which is a little different. below is what i have.

I appreciate your help in trying to wrap my head around this

@david.rya.goderre1 ,

Kindly utilize the Fetchone method for value retrieval. I noticed that you employed the Fetch method to set a value on TaskIdEntity. After generating the script, you can manually change Fetchone.

Best regards,
Arvind

I think i implemented the fetchone method like you asked, but the value for TaskIDReference is blank. Did i do something wrong? I posted my events below

Also some follow up info, in case it is not clear, the TaskReferenceIDNumber field is a Auto Number field (set to start at 20000), so i dont pass any value there, it is set by the rules on the data field. See below

Instead of retrieving data from the entities in the button events, drag and drop the label control and use set value in the label events to retrieve the data from entities.

In this case, the data sent to entities after click on the Button.
After that we can retrieve the data and display in the label.

Hope you understand!! @david.rya.goderre1

Hello @david.rya.goderre1 ,

Got it. In that case, refrain from using the autogenerated number. Instead, follow the steps below:

  1. Generate a temporary GUID during page load.
  2. Introduce a field in your entity to store the temporary value.
  3. During the creation rule of entity records, pass the temporary value.
  4. Once the entity is created, utilize the Fetchone method to store a single entity row based on the temporary ID into an app variable of the same entity type.
  5. Subsequently, use the app variable to access data across applications.

How do i retrieve the data from the entities? Using the fetchone method returns nothing.

So the only issue with this plan is that the GUID is going to be too long for the user to remember. The autogenerated number fits perfectly for my use case, and i can see it is getting set in the entity data, but i just can’t retrieve it.

@david.rya.goderre1 ,

Can we have a call? I will share link into DM

@david.rya.goderre1 ,

Keep autogenerated GUID only for call the single records to identify and other auto generated number you can use to display on page.

Thanks,
AK

@david.rya.goderre1 ,

There is a good news for you that latest feature support return of records id and you can do as below.

NewPage.btnSubmit.CreateEntityRecord.RecordId

Try above once your create records completed on button.

Thanks,
Arvind

I am free for a call now yea

This gave me the GUID. Is there a way to use the GUID to return the Auto generated number data piece as well?

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