I have a collection variable, and need to get the last value of collection Variable in nintex Workflow. My Collegues have used for loop and assigned the value to a a new variable 'x', thus when loop ends the last value will be stored in the new variable 'x'. Is there any easy way to do it?
you could count how many items are in the collection and then retrieve the element at index (n-1) because element's index is 0-based..
There is an action under Collection Operation (if you are on-premises, if you're on O365 I don't remember the name) that counts elements in a collection, so it can be dynamic
there is as well a Pop operation of a collection action that retrieves last collection element.
note however it doesn't just read out the last element but it removes it from collection in one go