InfoPath open behavior view rules not working in SharePoint InfoPath Form Services - InfoPath Dev
in

InfoPath Dev

InfoPath open behavior view rules not working in SharePoint InfoPath Form Services

Last post 09-16-2013 08:07 AM by David Alvarado. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-11-2013 12:43 PM

    InfoPath open behavior view rules not working in SharePoint InfoPath Form Services

    Hello Everyone,

    I have created an InfoPath form for the browser and am using it as a content type for a SharePoint Document Library. I added some rules that direct a user to a specific view based on their username as it compares to three different SharePoint lists. The three SharePoint Lists are Requester, Approver, and ITteam. Each list contains specific usernames and are added as secondary connections to the form template. Each secondary connection is set to refresh every time the form is opened. A copy of the lists is not stored in the form.

    I added some open behavior rules which would change the default view of the form based on the current user's username compared against the SharePoint lists. These rules wok perfectly when opening the template in InfoPath however the rules do not work in the browser. Regardless of user, the browser form opens in the default view.

    I am curious to know if the open behavior rules do not work in InfoPath Form Services or if there is something I can do to make my open behavior rules work in the browser.

    I am using InfoPath 2007 with SharePoint 2007.

    Thank you.

    --
    David Alvarado
    Adams County Colorado
    --
    David Alvarado
  • 09-13-2013 03:34 PM In reply to

    Re: InfoPath open behavior view rules not working in SharePoint InfoPath Form Services

    Well, in an effort to get something in production I had to resort to the high maintenance option of building permissions into my form for specific users; abandoning the user SharePoint lists. For those who care to know, I created a new text field called "Role" and added rules to the UserName field for each user with higher authorizations which would set a value for the Role field depending on which user opens the form.

    First of all, I had to abandon separate views and resort to using a single view broken up with sections to separate the content that should be limited to specific users.

    The rule I added to my UserName field works under the condition: UserName is equal to "ALVARADOD". The rule itself sets the value for the field Role with the value ITteam or Set a field's value: Role = "ITteam". A separate rule is added for each specific user who will need access to restricted sections.

    I then added a conditional formatting condition on the section restricted to IT staff that checks if the condition if Role is not equal to "ITteam" is true and if so to Hide the control.

    This means that each time a person with advanced privileges leaves or comes on board, the template will have to be edited, published, added to Central Admin, activated to a Site Collection, and applied as a content type.

    Not the ideal route, so I am hopeful that someone will be able to chime in on my question with regards to the open behavior view rules and InfoPath Form Services.

    --
    David Alvarado
    Adams County Colorado
    --
    David Alvarado
  • 09-15-2013 03:06 PM In reply to

    Re: InfoPath open behavior view rules not working in SharePoint InfoPath Form Services

    What you did should work fine.

    Do you have a condition on your Open rule?

    Did you check the name of the current user and make sure there isn't case sensitive mismatch or something?

    Are your data connections set to query on load?

    Patrick Halstead
    Project Manager at Qdabra
  • 09-16-2013 08:07 AM In reply to

    Re: InfoPath open behavior view rules not working in SharePoint InfoPath Form Services

    Thanks Patrick,

    I did have open behavior rules setup and thought that the UserName field would be case sensitive so I added the following default value formula to the UserName field:

    translate(userName(), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ")

    The usernames in the SharePoint lists have been entered in all caps.

    The current user field on the form shows up in all caps as well.

    The data connections are also setup to query on load.

    Not really sure what else needs to be setup for this to work in SharePoint InfoPath Form Services like it does in InfoPath Designer.

    Thank you for confirming that I am checking in the right places.
    --
    David Alvarado
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.