a-aron
Design Dabbler

Compare variable (ID) against SP list to see if its in use

Jump to solution

This is my first time on the Nintex forum and using the tool in general.

I'm under a strict time line and wanted to see how challenging the following would be to build. Thanks in advance.

 

1. Append a string to create a unique formated ID (LMK-1234-SS)

2. Apply to a variable

3. Compare variable against another SharePoint list (ID List)

4. Does ID exist in the "ID List"?

     Yes - genearte new ID

     No - write vaiable value to "ID List"

 

I'm sure this is pretty straight forward, but any pointers on how I would do steps 3 and 4 would be appreicated. Thanks.

0 Kudos
Reply
2 Replies
burked
Nintex Employee
Nintex Employee

Re: Compare variable (ID) against SP list to see if its in use

Jump to solution

Hi @a-aron

This sounds pretty straight forward.  If you have steps 1 and 2 already figured out, steps 3 and 4 would be configured as follows:

 

  1. Query List action 
    - Target the 'ID List' and filter using the variable created in step 2 and the column where the ID's are stored
    - Specify separate output per column (specify the list column where ID's are stored). This will output any values that match the filter to a collection variable
  2. Check if Item Exists in Collection Action
    - Using the collection variable from the previous step as the Target Collection, use the formulated ID variable in the 'Value'
    - Output will be a boolean (yes/no) value (Yes if it exists, no if it doesn't)
  3. Run If action
    - Specify if Boolean Variable = Yes for the run. This will run if the ID existed in the collection (meaning it existed in the list
    - Nest the actions to create the new ID in the run if
  4. Create List Item Action (after Run If)
    - Create the unique ID in the ID list

One note on this, if you want to ensure that the new ID's are not in use, you could nest steps 1-3 in a 'Loop with Condition' action and specify that it will loop until the Boolean variable equals no. The final steps for this configuration would look something like below:


ItemExists.png

 

View solution in original post

Reply
a-aron
Design Dabbler

Re: Compare variable (ID) against SP list to see if its in use

Jump to solution
Thanks @burked, I'll put this to the test in a few!
0 Kudos
Reply