โ07-23-2025 03:53 PM
{
Entries:
[
{
Entry ID: 23148031822,
Entry:
{
Username: Carol,
User ID: 12345,
}
},
{
Entry ID: 654354654654,
Entry:
{
Username: Mary,
User ID: 98765,
}
}
]
}
Hi there! I would like to grab a list of the user IDs to look like, [12345, 98765] as a variable. I have it set to a string right now, as I can't get the entries list to pop up as a data pill in the workato array variable.
I have had no luck using format_map or pluck, so please let me know where I am going wrong. I am trying to avoid using a for-loop, but I will if I have to.
Thanks!
Hailey Gebhart
โ07-23-2025 04:27 PM
If you want to return an array, you need to do entries.pluck("entry").pluck("user id")
Note that "entry" and "user_id" are not the exact keys you need to pluck. You need to pluck them based on their "API Name", which you can see by hovering over the data pill in the recipe data panel. Check this other post where I explain it in more detail:
Also, your variable probably shouldn't be set to an array. Workato doesn't play well with primitive arrays like this, so you should actually just make a string variable, set it to formula mode, and use the above code to create the array.
If you want to convert the primitive array into a "Workato list", this requires a few additional steps.
โ07-25-2025 09:02 AM
I go this to work. Thank you so much for the helpful advice!
โ07-30-2025 05:31 AM
Hi,
To get values from nested list we can use formula mode and try in this way flatten.pluck('List_name').flatten.pluck('list_name) pattern . So we can get all nested values in this method
Attached the working method in screenshot .please refer once
Thankyou
This is structure i have defined for nested lists
Formula implemented to get nested list
output for nested list 1
tried to pluck another nested list
Output for nested list 2