Is there a way, without the use of a ForEach action, to query a collection variable by a value and get its index inside the collection?
I'm using Nintex Workflow 2013 on-premises
Actually you can do this with the Collection Operation action using Exists... but its not Andrews fault for not knowing because the Nintex documentation under the help menu is wrong.
. You can use the "Exists" method of the Collection Operation to do exactly what you want. Exists actually returns a numeric - the index of the 0 based collection. You can log to history to see that this is true as I did below when I use Exists on the value Buffalo.
Index of Buffalo:
No (Original Post)
Edit: From the help documentation, Exists returns a yes or no boolean that the value exists and not an index. But see Mike Matsako's response, Exist does return an index.
That made me laugh
HA, Sorry. I just wanted to post my shortest response ever. I can't find any way. There are no Collection operations that do this
Remove by value
And if you use Join, put into a string variable, there are no inline functions that can operate on the string to find an index
I didn't find anything using SharePoint calculated field formulas either
Calculated Field Formulas
So if this truly is the case, what are you trying to do with the collection?
Perfect Mike, thanks for checking it out for real! I should edit my response to not scare future readers away. (but it was so fun).
I'll get the help documentation updated to reflect this! Go Team!
Hi Mike Matsako,
thank you very much for your clue!! and also thank you Andrew Glasser for all the reply you have posted here , especially the first one!
Thanks again, I was not so confident that there is a solution but, as always, this community is great!
Retrieving data ...