1

I am working on a site in sharepoint 2010 and have an infopath form attached to a list. The form has two views a user view, for users to enter in information and an admin view that contains fields only for admins to fill out. I want to be able to only allow users who belong to a certain permissions group to be able to see the admin view in the form as well as automatically switch to the admin view if an admin is editing the item in the list. Is there a way to set the view depending on permission group while also preventing non admins from accessing the view in the form?

2 Answers 2

1

The basic idea is that you'll need to create a data connection to your groups using UserGroup.asmx to query if the current user is member, according to the result you can add the proper rules.

for more details about the steps please check the below :

Checking if a user is a member in a SharePoint group within web InfoPath 2010 forms

2
  • When I followed the steps in the post, I reached the point where I edited the GetUserCollectionFromGroup1.xsd file but when I tried to open the manifest in design, I got an error that it could not be used.
    – bberndt
    Commented May 15, 2018 at 15:17
  • i checked the same , replace <s:elementname="tns:GetUserCollectionFromGroup" type="tns:GetUserCollectionFromGroupType"></s:element> , with <s:element name="GetUserCollectionFromGroup" type="tns:GetUserCollectionFromGroupType" /> , try and let me know
    – A.Saéed
    Commented May 15, 2018 at 15:55
0

A. Saeed, you are the first person in about 100 posts I've read that fixed this for InfoPath 2013. AMAZING.

replace <s:elementname="tns:GetUserCollectionFromGroup" type="tns:GetUserCollectionFromGroupType"></s:element> , with

<s:element name="GetUserCollectionFromGroup" type="tns:GetUserCollectionFromGroupType" />

This is the fix for InfoPath 2013

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.