I think I worked out a way to handle this.
I just ran a nested "for each" repeated step to run through the list but without any actions. Then when I use the pill from the nested repeat step it seems to always get the final list item record. Not very elegant but seems to work, I would be interested if there is a better way.
Ended up doing this:
I am not sure, I completely understood.
To get the last item of the list or array you can use ".last" method. with the list.
the last function gives the last item or object if the list contains objects, you can access object values with object['fileld_api_name']
Is this you are looking for.
Hi Mark, instead of using the additional actions to obtain the value, you can make use of formula mode .pluck to do this.
More about .pluck: http://docs.workato.com/formulas/array-list-formulas.html#pluck
Other useful formula for handling arrays: http://docs.workato.com/formulas/array-list-formulas.html#formulas
Field Mapping and Formula
Send us a ticket, we will try our best to assist you with your problem
Get a value from the last item in a list?
I need to cycle through a list to the last item and then use the value from that item later in the recipe. I understand repeating through a list and performing actions at each item, or selected items, but how do I test for the last item in the list?