cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

using run if on site workflow

Jump to solution

Good day,

I am trying to use a run if on a site workflow and it doesn't seem to be working, it isn't failing, just not doing what it is supposed to do. The options are a little different then list workflows; basically I am not sure what the bottom [highlighted in red] is supposed to be used for.  What I want it to say is "if PermissionsWFRun = 0, then run the workflow."

Thanks,

Jennifer

Reply
9 Replies
Workflow Hero

Re: using run if on site workflow

Jump to solution

Jennifer,

When you are using a Site Workflow and a List Lookup, you will need to help the workflow find the specific Item in the list that you want to run the workflow for, and then check the value for PermissionsWFRun field.

Will you have multiple items in the list with  PermissionsWFRun = 0? I will assume Yes. (if no, please see at the end of this post)

In that case, you need to precede the RUN IF Action with a Query List action and a For Each. Something like below:

You could also filter out the results of Query List action and avoid using the RunIf action.

If you will NOT have multiple items in the list with  PermissionsWFRun = 0, then you could do Query list as below, and then skip the For Each and the Run If actions.

Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

You could change the condition dropdown to "If current item field equals value", set the field to PermissionsWFRun, then type 0.

In the screen shot, you are asking, If any item found in the list ContractRouting where PermissionsWFRun is equal to 0, then take the collection of that result and compare the entire collection to the value of not 0. This condition should never be found in it's current state.

Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

Sorry I should have been more clear and shown the entire workflow.  I do have a query list action; the part that I am confused on is the red part of the Run If. 

Thanks,

Jennifer

0 Kudos
Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

Thanks for the reply Andrew; where would I do that? I have that selected at the top [red] and it isn't an option at the bottom [yellow]:

Thanks,

Jennifer

0 Kudos
Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

Jennifer,

Here is what I think you need to change. From what I can see, you are getting into a circular reference. You need to compare the variable you are getting out of the "For Each" action, to the column in the list to narrow down to a specific item,. and then lookup the value for PermissionsWFrun, and it it is 0, then execute the RUNIF.

Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

The top in Red seems to say "If Any value equals value". I don't see that it is selected as "If current item field equals value"

0 Kudos
Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

Because she is running a site workflow. No "current item" available here.

Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

Good point, missed that detail

Reply
Workflow Hero

Re: using run if on site workflow

Jump to solution

Thanks Prasanna​ that was really helpful!

0 Kudos
Reply