User Roles Question - InfoPath Dev
in

InfoPath Dev

User Roles Question

Last post 04-23-2008 09:27 AM by Greg Collins. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 04-15-2008 01:19 PM

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    User Roles Question

    Hi,

    I'm attempting to use "User Roles" for the first time with my form.  -  Infopath 2003 and Sharepoint 2003 products in use.

    I have a form that routes a form, via email attachment, to various people within my company (besides logging a copy of the file on my sharepoint form library).  I defined a user role called IT Executive and added the appropriate NT ID's for those people.

    I then went to my approve and reject buttons and set a rule that says if the current user role does not equal IT Executive, then disable the approve and reject buttons.

    I published the form to sharepoint and started to run some tests.  The rule doesn't seem to be working. 

    Am I doing anything wrong??  Any thoughts would be apprciated.....

    Thanks

    Lou

  • 04-15-2008 04:08 PM In reply to

    When you say "Rule" do you really mean "Conditional Formatting"? I'm assuming so.

    The current user role appears in the bottom right of the InfoPath application window. Check to make sure you are in the user role that you are expecting to be in.

  • 04-16-2008 05:53 AM In reply to

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    Hi,

    Yes, I invoke the current user role using conditional formatting on the approve and reject buttons.  So the list of NT ID's that I used to create user role "IT Executive" is applied to the buttons and disables them if you are not part of that group of ID's.  During testing, I selected myself as an IT Executive and submitted the form.  When I open the form up from my email (as an IT Executive) the buttons are active.  But my nt id is not part of the IT Executive role I created.  Shouldn't those buttons be inactive for me or maybe I'm just not testing it properly.

    You answer your question, the IT Executive is showing on the bottom right of the screen.  I also have the check box enabled for the role to be initiated when the form is opened.

    Thanks

    Lou

  • 04-16-2008 07:07 AM In reply to

    I just finished up designing a form using roles and they are not all that you would think they would or should be.  However your situation should be rather easy to set up.  This is my recommendation:

     I would create two roles, Employee (or something similar) and your IT Executive.  I would set the Employee as default and initiator, and set it to the text box on your form where they would enter their name or something like that.  I then would setup the IT Executive the way you did, by adding the users, but don't set it as initiator.  Then use your rules to hide or show the buttons.  Doing it this would start everyone out as the Employee role, even if they are in the IT Executive role.  The form would have to be submitted and then reopened for the IT Executive roles to come into play.

     In testing if you add your self to the IT Executive and you publish the form, and test it.  But make sure to remove your self from the IT Executive group and republish the form.

  • 04-16-2008 09:01 AM In reply to

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    Thats great advice.  I will try your suggestion and let you know how it goes.

    Thanks....appreciate it

     Lou

  • 04-16-2008 10:35 AM In reply to

    Yes, I'm sorry if I misunderstood--but you need to have AT LEAST 2 roles specified. One for the special case, and one for everyone else. If you only have a single role, then EVERYONE is part of that role.

  • 04-16-2008 11:18 AM In reply to

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    Thanks Greg.....

    I applied both roles and the form seems to be functioning properly.  I have to put it through some more trials but things look good.

    Thanks to both of you for the quick replies and advice.

    Lou

  • 04-16-2008 12:20 PM In reply to

    Glad to help.

  • 04-21-2008 07:11 AM In reply to

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    I have a follow up question:

    I didn't realize this but I have a 3rd user called PMO that I think I need to incorporate.  I created the role and added the NT ID's accordingly.  So the PM role opens up initially as default.  Then once the form is routed via email to the IT Exec, that role is initiated.  All works good.  Now I have a PMO role that is part of the email distribution (cc'ed).  That person should not have capabilities to approve or reject the form. 

    So how do you incorporate a 3rd user role into a form?

  • 04-21-2008 04:15 PM In reply to

    The process is identical to how you did the others. The main thing to remember is that user roles are assigned in top-down order. So you want to have the role with the most rights in the form at the top. This is because a user might exist in two or more roles, and if you have the most restrictive role at the top, you are limiting them to always be in that more restrictive role. It's better to have them always in the least restrictive role.

    But restricting button functionality via roles is just how you did it before (conditional formatting).

  • 04-22-2008 11:28 AM In reply to

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    ok.....thanks for the info.

    Lou

  • 04-23-2008 09:27 AM In reply to

    No problem!

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