SP2010 web forms - Switch views on Form-load based on SP Group membership - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SP2010 web forms - Switch views on Form-load based on SP Group membership

Last post 05-12-2012 03:54 PM by Brendan42. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-03-2012 01:51 AM

    SP2010 web forms - Switch views on Form-load based on SP Group membership

    Please can someone save me from pulling my hair out on this frustrating issue. New-ish to Sharepoint, using SPD 2010, Infopath 2010, not able to use Visual Studio.

    I have a web form which I want to use to allow us to log issues onto a SP list. The form design is done, comprising three views:

    Date entry view - needs to be shown only to members of a specific SP group called "EHS Team". This view allows anything on the form to be changed and submitted to the SP list.

    Follow-up view - most of the fields are disabled, but allows for some data entry and marking an item as "Completed". Allows for submitting to the list. This form is to be accessible to another SP group called "Investigators"

    I need to have the form switch to the correct viw upon loading. I've followed the steps in numerous online topics (here and here ) and have got the two Data connections (GetGroupCollectionFromUser and GetUserProfileByName), modified the XSD file to allow for more fields ot be visible etc, but I cannot get the views to switch.

    In both descriptions, there is one step (after they modified the XSD file) where I am not sure, both referring to " Now right click on the manifest.xsf and choose Design. Choose GetUserProfileByName data connection and apply rules on the PropertyData field as following..."

     

  • 05-03-2012 02:06 AM In reply to

    Re: SP2010 web forms - Switch views on Form-load based on SP Group membership

    You have to put change view rule on form load. Get the user by using GetUserProfileByName function from the Userprofile manager webservice. Check the user login and his group and then direct him to view by putting rule to change view on form load.

    Vishal Srivastava
    Senior Software Engineer
    SDG Software Pvt Ltd
  • 05-03-2012 02:41 AM In reply to

    Re: SP2010 web forms - Switch views on Form-load based on SP Group membership

    Hi Princevis.

    I've already done all that, but I seem ot be missing something...

    Got the following from the Rule inspector:

    Conditions

    Name = "AccountName"

    Actions

    Set a field's value: userLoginName = Value[Filtered]

    Query using a data connection: GetGroupCollectionFromUser

    Document On Load: Query Group Membership

    Conditions

    @Name[Filtered]

    Actions

    Switch views: Normal

    Document On Load: EHS Team view switch

    Conditions

    Incident_x0020_Type = "Unsafe Condition"

    Actions

    Switch views: Unsafe Condition

    Document On Load: UC view switch

    Conditions

    Incident_x0020_Type = "Unsafe Act"

    Actions

    Switch views: Unsafe Act

    Document On Load: UA View Switch

  • 05-12-2012 03:54 PM In reply to

    Re: SP2010 web forms - Switch views on Form-load based on SP Group membership

    All done in a rather non-technical way. I had a list of contact details already, just added another column to those details where I enter the logon credentials of the EHS team. There are others on the list, but their credentials are left blank. Then use a form load rule to switch views if the current users credentials are found in this column. Not ideal, but just couldn't get the usual method to work.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.