I would like to build a Set Condition or a Run If control in my workflow that will only run if the creator of the item is a member of a specific sharepoint group.
Are you using Nintex Forms as well as Workflow? If so, you could have an inline function on your form fn-IsMemberOfGroup(yourGroupName) which will spit out "true" or "false." Attach that to a hidden column and have your workflow conditionally start on that column's value.
Courtney, yes we do have Nintex Forms and Workflows.
I have used that function to hide a portion of a form (thank you to you guys for helping me do that) but I am not sure how to incorporate it in this instance.
Maureen Eversmeyer
Hey Maureen! Glad to hear you're familiar with the formula As for how to implement it here, I would do as follows:
- Create a column on your list called wfStart or something, this will be what you check for a conditional start on your workflow: wfStart == true or wfStart == false.
- On your form, create a calculated value field. For the formula, put fn-IsMemberOfGroup(whateverGroup) and connect it to your wfStart column and then set it to hidden. Don't put your wfStart field on the form. Make sure that the "Recalculate formula on new mode" is "Yes."
- In your workflow, have your conditional start be if wfStart == true
- Ta-da! Bask in the glory of your wonderful work
Let me know if you have any other questions!
Silly question, what type of column for wfStart, Y/N?
Maureen Eversmeyer
I would just make it a text one, personally.
Another dumb question:
Run If
Condition – if current item field equals value
Where – drop down: wfStart
Drop down: Equals
Drop down: Value
Do I just type TRUE in this field???
Maureen Eversmeyer
Yep! Just put true! If you want to test first, you can have the workflow run always, and have the action be log the value of wfStart, just to make sure that it's getting the "true/false." Or go in on it this way and only do that if it doesn't work, haha. Depending on how motivated I'm feeling, I sometimes go for the first option (try first, debug later!)
Hmmm, I must have done something wrong. See attached images, please.
Maureen Eversmeyer
Can you look on the list item and see if it saved "true" to wfStart column? And did you complete this item in the form, or in a quick edit? And is the person completing the testing in the appropriate listed group?
The list item does not show any value for wfStart
I created a new item, using the form
I am in the sharepoint group being referenced
Maureen Eversmeyer
Ahh, remove the quotes on your group in your formula. Also, you can make your calculated field visible on your form for testing to make sure the formula is evaluating correctly.
HA!! It worked!! You rock!!!
I am curious, though, because having the quotes in there for the Form rule worked for disabling a form part for people who weren’t a member of a specific group.
Anyway, thank you so very much!!!
Maureen Eversmeyer
I noticed that calculated value gets resolved only if it is NOT hidden. I work around this by selecting white (transparent) color for it.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.