locked
Hiding Columns Based on The User / Usergroup RRS feed

  • Question

  • I have created a form in Infopath.

    I would like to give column wise access to few users/ usergroups.

    I tried creating a new view and tested with two usergroups, but when the form is saved a new item is added instead of editing the same item

    Thank you

    Alex

    Monday, February 25, 2019 8:17 AM

All replies

  • Hi, Alex,

    It is possible to use user information list to fulfil your requirement.

    Here are brief steps:

    1. Create lists containing the login ids (not other names ) of members in different groups. For example, on list named “allowed” have all the members who can see the whole form, and another list called “restricted”  contains all the members who can only see a part view of the form.
    2. Create all needed views in the InfoPath.
    3. Add a data connection to get user account data from user information list. Set it to a filed to store current user account. The detailed steps are listed in the following article.

               http://codelesssharepointinfopath.com/infopath-user-information-list/

    1. Add data connections to read login ids from the list containing group members.
    2. Add an action on form load. Set it to switch view under the condition when current user does not belong to a certain group.

     

    Note: the name filed in the second blank is the field storing current user account.  It is the same field with “Current User Name” filed mentioned in the article I provide. Authorized people is the list I use to store all users who can see the whole form.

    For your issue about adding new items instead of editing the original item. Could you provide you detailed steps and how you set all the controls ?  I will try to manage to reproduce your issue.

    Best Regards

    Jerry Xu


    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, February 27, 2019 1:12 AM