Difficulty isolating Custom List Selected Value object properties. [Solved]

Hello all,

I recently did a proof of concept that involved the following systems:

  • Data Service
  • UiPath Apps
  • UiPath RPA

REQUIREMENT:
I wanted to modify the Status property of my Request entity (data service) to change it to ‘Escalated’, ‘Completed’, ‘Withdrawn’, etc. Easy enough to achieve, right?

The challenge was that I had difficulty extracting the contextual GUID from a UiPath Apps Custom List for the item that was selected. This is because it was configured to return a list of Objects of that Request Entity. Working with repeating objects is major business case for more advanced apps.

In short, I wanted to grab the GUID from my Entity Request Object in the Custom List so that I could send it to a Process input argument using rules and update my Request.Status.

I had a lot of trouble isolating the property value of this object (a GUID) within UiPath Apps. When I binded the CustomList.SelectedValue to an App Variable, I could see the value was being passed as an Object.

I changed the input parameter for my Process to an Object and decided I would figure it out there.

When I exported the object to a log, this is what I saw:
{ “ID10330”: { “ID10364”: “2021-05-03T10:31:26.74-04:00”, “ID10370”: “REDACTED”, “ID10376”: “980f098e-df45-465f-ac3a-f2a3678ac60e”, “ID10382”: true, “ID10388”: “David Kroll”, “ID10394”: 0, “ID10400”: “2021-05-03T10:31:26.74-04:00” }, “ID10406”: “2021-07-14T19:19:07.5961458-04:00”, “ID10412”: 0, “ID10418”: “1234”, “ID10424”: “Testing 123”, “ID10430”: true, “ID10436”: “2ad3ace2-f9e4-eb11-b563-28187832a548”, “ID10442”: true, “ID10448”: “1234”, “ID10454”: “German Office”, “ID10460”: “Plant 3”, “ID10466”: “Submitted”, “ID10472”: “Test Request 10”, “ID10478”: { “ID10512”: “2021-05-03T10:31:26.74-04:00”, “ID10518”: “REDACTED”, “ID10524”: “980f098e-df45-465f-ac3a-f2a3678ac60e”, “ID10530”: true, “ID10536”: “David Kroll”, “ID10542”: 0, “ID10548”: “2021-05-03T10:31:26.74-04:00” }, “ID10554”: “2021-07-14T22:18:49.628438-04:00”, “IDa754f611dea24c5fa3e586b54feea7a7”: “2ad3ace2-f9e4-eb11-b563-28187832a548”, “IDc14361577cbc48a0b323260c2df304b5”: “Mark Shipped”, “ID4c0e644f4d7d4bbf914582e8b09c67a0”: “Test Request 10”, “IDb64aa1cfe816496085cdc9a9f2e08ef1”: “Submitted” }

SOLUTION:
I ended up passing the argument as an object, isolating the object property as a string, and then writing a substring function to extract the correct GUID out of this object (bolded above, as the property names are referenced as “ID#” but do not change once bound to the Custom List control - in my case the property was “ID10436”).

  1. Pass the “selected row” as an object to the process as an input parameter.
  2. Isolating the object property (I did this by finding the index of the property and returning it - in my case it was index 6): inputParam(6).ToString
    This returns the following: “ID10436”: “907b0193-84e5-eb11-b563-28187832a548”
  3. Create a substring function to extract the GUID as a string - your starting number may need to change: myGUID.Substring(12,36)
    This returns the following: “907b0193-84e5-eb11-b563-28187832a548” (FINALLY :smiley:)
  4. In the “Update Entity by ID Activity”, use System.Guid.Parse(myGUID) to convert the string to a GUID so it will accept the argument.
  5. Update the specified entity record.

I wanted to pass the solution along in case someone else is working with a Custom List fed by a list of Objects and struggling to pass the selected record for easy processing. If we have an easier method to isolate the GUID from the object and send that to the input parameter, it would be ideal.

Anyone know of a better way to do this?
:slight_smile:

Thanks much,

David

1 Like

Hi @Krollythegoalie!

Thank you for the very detailed post. I’m glad that you where able to find a work-around, but this is definitely a sub-optimal experience… We’re working on a much better way of dealing with this by providing a ‘Selected Record’ reference in the resource panel with a way to reference individual fields. We plan to release this before the end of the month, so hopefully this won’t be quite so challenging the next time you try to do this.

Thanks,
Evan

1 Like

That is great to hear! Thanks Evan, I can’t wait! :slight_smile: