none
How to check login user particular group or not in infopath form RRS feed

  • Question

  • Hi,

    I have been design the Form, and I have created Sharepoint List for Approval groups. Now I want to Check the Login user is particualr group or not because based on that login user we would display the Infopath from Views.

    We have Approval SharePoint List like as below.

    Title                Users(people groups field)

    Approval 1        we have 3 users

    Approval 2         We have 4 users.

    Now we need to check the Login user Approval 1 or not. Here i am facing fetching the multiple users in infopath form. 

    Could you please help on this one. How to fetch the multiple users from SharePoint list in infopath form. 

    Monday, October 21, 2019 8:41 AM

All replies

  • Hi Suresh_p41,

    To fetch the multiple users from SharePoint list in InfoPath form, you could create the data connections for the Approval 1 list and Approval 2 list.

    Then you could filter the current user in the two data connection, if the current user is in the Approval1 data connection, then the current user is from Approval1 group.

    If the current user is in the Approval2 data connection, then the current user is from Approval2 group.

    To create data connection, you could click DATA Tab and then click “Data Connections”.


    There is a similar post:

    https://sharepoint.stackexchange.com/questions/222268/how-to-check-if-current-logged-in-user-is-in-sharepoint-group-or-not-in-info-pat?rq=1

    More reference:

    Add a Data Connection to SharePoint List or Library in InfoPath Form Template.

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.


    Tuesday, October 22, 2019 2:53 AM
    Moderator
  • Thanks For your replay. But my request is different. I want to map the multiple people picket column users to info path form. . Added Data connection but now i need to check the user is particular group or not. that group name already i have given in list level like as below

    List name: Approvers:

       Title                           users(people picker data type-Multiple users allow)

    Approval 1                     test1,test2,test3

     Approval 2                   test6, test 7,test8

    Now , we want to check the login user test1 or not. Already I have added data connection but how to compare the login user to sharepoint list users. 

    Tuesday, October 22, 2019 7:50 AM
  • Hi Suresh_p41,

    You could filter in the data connection using “test1”.

    If the “test1” is in the data connection, then the “test1” is the approver.

    You could add a textbox field in the InfoPath and set the value of the textbox by filtering the data connection.

    More reference:

    Filter the data that is displayed in a control.

    https://support.office.com/en-us/article/filter-the-data-that-is-displayed-in-a-control-7c9471ed-46e6-40fc-93b6-8f25e5fa4deb

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, October 23, 2019 2:41 AM
    Moderator

  • Hi Suresh_p41,

    If the reply is helpful to you, you could mark the reply as answer. Thanks for your understanding.

    Best regards,

    Sara Fan

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, October 25, 2019 8:27 AM
    Moderator
  • Hello ,

    thanks for your information...

    I was added like this only but now i want to check the login user is Equuleus to Approve1 or not. How to check the login user is exist or not in Approve1 list.

    Ex:  I have created separate SharePoint list(approvers list)

    Title                  Approvers(people picker filed it allow multiple users)

    Approve1               test1,est2,test3,test4,test5.---->test users

    Approve2                 test4 ,test5,test10------test users 

    now i want to check the login user is exist in approve1 or not...because i am displaying the views based on login users for approval...Please help on this how to check the login users is exist or not in SharePoint list. 

    Monday, November 11, 2019 6:58 AM