Allows users to have access to the first view only in infopath - InfoPath Dev
in

InfoPath Dev

Allows users to have access to the first view only in infopath

Last post 08-27-2015 08:43 PM by donstephen. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-19-2015 05:11 AM

    Allows users to have access to the first view only in infopath

    i have a form with multiples views and i want a group of users to only have access to the first view on the form whiles others can access the remaining views.
  • 08-23-2015 11:40 PM In reply to

    Re: Allows users to have access to the first view only in infopath

    Hi,

    May I know how the groups are categorized? Are you using the Active Directory (department?) or do you have a SharePoint list that segregates the users? I would suggest adding a switch view action on form load after determining which group the current user belongs to.

    Regards, 

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 08-24-2015 02:08 AM In reply to

    Re: Allows users to have access to the first view only in infopath

    Hi

    I am  using Active Directory 

  • 08-27-2015 06:59 PM In reply to

    Re: Allows users to have access to the first view only in infopath

    Hi,

    Sorry for the late response. If you don't have that data connection configured yet, kindly create one by using via SOAP web service:

    • Enter the URL for your Active Directory:
      http://%3cyoursharepointsite%3e/_vti_bin/UserProfileService.asmx?WSDL
    • Select the operation GetUserProfileByName. 
    • Click next until you reach the last page of the data connection wizard.
    • Uncheck the check box that automatically retrieves data when form is opened.
    • Click Finish and close the data connection window.
    • Under the Data tab of InfoPath, click Form Load.
    • Add a rule called Get Department.
    • For the first action of that rule, add a logic to populate the AccountName query field of the GetUserProfileByName data connection using the function userName() - you might need to use a subsring function to remove unnecessary data.
    • Add an action that queries GetUserProfileByName.
    • Using this Active Directory, you may now extract the curent user's data from the items returned.
    • To get the current Department, add a field called Department to your form.
    • Populate that field with the the Value node from the data connection and filter this data by setting the Name = Department.

    I have attached a sample form you may use for reference. Note that some conditions or scenarios might not be applicable for you due to the difference of our SharePoint environments, but the approach should work.

    Please download the form (right click > save target to a local folder > right click xsn > open in design mode), then check the set of rules under Form Load.

    Hope this helps.


    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 08-27-2015 08:43 PM In reply to

    Re: Allows users to have access to the first view only in infopath

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.