SP2010 - showing/hiding form fields based on users' list group membership - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SP2010 - showing/hiding form fields based on users' list group membership

Last post 12-03-2014 05:29 AM by little_ghost. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-27-2014 01:45 AM

    SP2010 - showing/hiding form fields based on users' list group membership

    Hi all!

    I have a somewhat complicated situation with which I need some help. Problem: Certain fields in a (list) form need to be hidden when the user is not an Admin. I am using SP2010.

    Setup:

    I have 2 permission groups:
    a) Contributers
    b) Admins

    Then I have a list called Permission_Groups with 1 column:
    a) Group Name

    The column holds 2 entries:
    a) Contributers
    b) Admins

    Then I have the list with the actual items (itemlist) and the (standard) form. The form has been modified in InfoPath. sections have a formatting rule with condition Group name is not equal to Admins and formatting option hidden I also added 2 buttons with the same rule as above.

    This works great EXCEPT when a user is:
    a) in none of the lists and not other rights (itemlist doesn't display at all)
    b) in none of the list but does have contribute rights on the itemlist (all fields and both buttons display)
    c) in both lists (Same as contributer (admin fields are hidden) and no buttons)
    d) a site owner (Same as contributer (admin fields are hidden) and no buttons)
    *For siteowners it doesn't matter if they are in Both, one or none of the lists.

    In principle, everyone should be able to contribute, so that is easy to fix (add eveyone to the contributers list). The admins is not a problem either, again, just add them to the admin list.

    edit
    There is one more problem though: adding everybody to the contributers list is done by addign NT AUTHORITY. This includes people who are admins. This meand that admins would be in both lists.

    The problem rest in the Admin-section when the people are also the siteowner(s).

    I hope this is clear and that someone can help me out with this.

    Kind regards and thanks in advanced!

    • Little_Ghost
  • 12-01-2014 04:23 AM In reply to

    Re: SP2010 - showing/hiding form fields based on users' list group membership

    It sounds like you just need more permission groups for the case where they are not in Contributors or Admins or when they are a Site Owner. This is not hard. You will need to make sure your formatting rules run from most exclusive condition to least exclusive.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 12-03-2014 05:29 AM In reply to

    Re: SP2010 - showing/hiding form fields based on users' list group membership

     Hi Patrick!
    Thanks for the reply but I can't seem to get worked out.
    As per previous description, the list items have their own permissions:
    Site_Owners - group Site Owners
    Admins item - groups Admins and Site Owners
    Contributers item - Contributers and Site Owners

    I am in: Site Owners group, so basically I'm on all the list items.

    On the admin button I have 1 rule that reads:
    conditions Groupname is not equal to Site Owners OR groupname is not equal to Admins, Hide this control
    On the contribute button I have 1 rule that reads:
    condition Groupname is not equal to Contributers, Hide this control

    If I check the form, I still do not see the button(s).

    What am I doing wrong?

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.