I have a list with field Name, Location & Vendor - Call it list A
I have another list with all the Vendors information with field Location & Vendor Name - Call it list B
I want to build a workflow when user create new item --> fill up Name and Location --> workflow started --> AUTOMATIC PICK UP THE VENDOR NAME BASED ON THE VENDOR'S LOCATION FROM LIST B AND ASSIGNED IT TO THE FIELD VENDOR IN LIST A.
Vendor: Disabled for edit
when user fill up Name and location, go to list B, sort location based on the input by user in this case is A and return the vendors available which are John, Angel and Cat. From these 3, select one of them randomly/by sequence. Once obtain the value, assign it to the list A Vendor field.
Solved! Go to Solution.
what exactly are you struggling with?
You can get all the available vendors using "Query List" Action
Get Items from: List B
Where: ItemProperty:Location = Location (Column in List B)
Field: Vendor Name -> some_collection_variable
After that, you can - according to your needs - pull out one of the vendors. What comes to mind first, as I don´t know how to create random numbers in workflow, is using the modulo operator on the item ID.
Something like this for "pseudo-randomness"
Thanks for trying to help!
I'm a total newbie in Nintex workflow and struggling with building a workflow with only very little knowledge on this. I've tried your method and it works until number of item in list A exceeded the count number in the collection operation.
I've only maximum 5 items after query in list B. But I will have more than 100 items in List A.
Trying to solve myself by modifying the neither the collection operation nor math operation but no luck.
Could you advise again? Appreciate it!
sorry my bad, I got the variables in the mod operation in wrong order.
You should do ItemProperty:ID MOD collection_count (e.g. some_number_variable).
Variables where in the correct order, what does a "log in workflow history" say about the number of items (after count) of the collection?
Turns out I actually got the variables in the wrong order. So
ItemProperty:ID MOD collection_count (e.g. some_number_variable) is correct, sorry!