How do I update a variable item

  • 2 December 2014
  • 5 replies
  • 0 views

Badge +4

I have a list that contains people and has a manually managed user ID field and a boolean field of 'next person to do something' which is only true for one user at a time. 

In a worklow, I want to

1)grab the ID of the person where boolean field = yes and do something

2)set boolean field to false for person in step 1

3)locate the next person via current ID +1 and set boolean to true

I have a workflow variable for the user ID - so steps 1 and 2 are working well. What I don't see in the update item template, how I can update an item where Field equals manipulated worklow data. Is this not possible?

Thanks from a n00b,

Erin


5 replies

Badge +4

Alrighty, I found the Math option and abstracted the count to the step before I need the +1. Not the prettiest, but I assume it'll work

Userlevel 7
Badge +17

Just a quick question, would the following scenario work in your situation?

  1. Query list for boolean field = yes, store listitemID (or userid) in a collection variable
  2. in a for each loop (for each ID in listitemID collection),
    1. do something
    2. set boolean field to No for this item by Update Item action
    3. ---for each will now loop---

In these steps you will not have to do any math to the user id. So in this scenario, if the user Ids are not in order in the list it will not matter. But you can still loop through all items in the list where boolean field is Yes because you have the list item ID and can query that single item and do anything you want with it within the loop.

Hope that helps,

Andrew

Badge +4

I'd have to capture the counter in the for loop to be able to properly

update the next entry's boolean to yes, correct?

On Tue, Dec 2, 2014 at 3:17 PM, andrewg@intellinet.com <community@nintex.com

Userlevel 7
Badge +17

Not if you use a foreach loop. You will just set the "Store Result In" for the current ID to a variable and use it to update within the loop. Does that make sense?

Badge +4

Yes and sorry for the late response happy.png

Reply