using User's Current Role with multiple roles. - InfoPath Dev
in

InfoPath Dev

using User's Current Role with multiple roles.

Last post 09-10-2009 09:17 AM by h.elshabini. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-14-2008 12:24 AM

    using User's Current Role with multiple roles.

    Hello,

     i was wondering if there is any way for the same person to have more than one role in infopath?

    as i have tried, infopath does not understand that a user might have more than one role in the form.

    however it is totally valid to assign the same person or group to more than one role in the (Manage User Roles) window.

    but it just doesn't understand that if you set a conditional formatting based on (User's Current Role), infopath always sees the current role as the first returned result from the User roles.

    is there any way to over come this?

    i have already done some messy stuff trying to assign a field with a certain value describing his role based on the username, which is sooo messy cuz its getting too large to maintain.

    any help?

  • 12-14-2008 10:08 PM In reply to

    Re: using User's Current Role with multiple roles.

    Hi,

    If there are multiple roles for the current user, infopath always checks the roles and assigns the first role as current user role. You can customize this using the code.

    Swathip
    www.ggktech.com
  • 09-09-2009 08:00 PM In reply to

    Re: using User's Current Role with multiple roles.

    Could you give an example how I could deal with multiple roles using code? 

    Thank you

  • 09-10-2009 09:17 AM In reply to

    Re: using User's Current Role with multiple roles.

    It depends whether your form will be run online or offline.

     Suppose you publish your form on SharePoint as a content type, you can create a webservice which determines the user's role based his user name, add this webservice as a datasource.

    for using web services as data connection see http://blogs.msdn.com/jannemattila/archive/2007/01/21/infopath-and-web-service-data-connection.aspx

    on the other hand, if you publish your form as an installable msi, for use inoffline enviroment, you can save the user/role data in an xml file. and add the xml also as a data connection.

     

    Please do not hesitate to follow up on your question if you need more details.

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