SharePoint Workflow to check for a username


  • My current workflow states that:

         If Current Item/Created by equals Joe Bloggs
         or Created by Bob Smith
         or Created by Fred Jones

    However, this means that I have to name each person individually.  I would prefer to use a SharePoint group or list of names.

    How can I get my workflow to look at the group or list to see if the name exists there?

    Thank you.

    J Sykes

    Thursday, December 1, 2016 12:40 PM

All replies

  • Hi,

    Here is solution for your requirement.

    Thursday, December 1, 2016 12:50 PM
  • This looks way too complicated for me, sorry.

    My requirement was for a small group of people to have their requests authorised by someone other than their manager that is specified in Active Directory.

    So instead I have created a SharePoint list of their names alongside the authoriser's name.  Then within the workflow I build a dictionary containing the name of the authoriser. It then creates a list item in the SharePoint list with the name of the current user and the name of the authoriser in a blank field. It then compares the two and if it doesn't match then it means that the current user is not on the list, and it then moves onto a different stage in the workflow.

    Seems to work so far!

    Thank you.

    J Sykes

    Friday, December 2, 2016 12:31 PM
  • Hi Joooools,

    According to your description, you want to compare “created by” user and a list of users in SharePoint workflow.

    I create a workflow as below without using “Call HTTP web service”.

    Build a dictionary:

    Add the workflow variable as below:

    Index: server as counter

    Key: current key for dictionary

    Create next step when there is no matched users.

    There is another way by simplifying the link in the above reply, it check users of SharePoint Group:

    Create a workflow as below:

    Build dictionary as below:

    Set “this” as:

    Set “Call HTTP web service” as below:

    Best Regards,

    Grace Wang

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Tuesday, December 6, 2016 6:05 AM