User Roles from Field - InfoPath Dev
in

InfoPath Dev

User Roles from Field

Last post 07-02-2007 11:17 AM by murphyadam. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-28-2007 01:21 PM

    User Roles from Field

    I have a form which needs to have a "Approver" role.  I set this role as a text field in the form.  This user role is based on whomever is assigned via a text field.  If the user who opens the form matches the user who is assigned in the field then it should identify him/her as "Approver".

     What is the format the User Role engine uses to correlate the user opening the form with the value of the field?

     I've used the following without success.

    username
    firstname lastname
    domain\username
    [email protected]

    Filed under:
  • 06-29-2007 03:39 AM In reply to

    I would say that it is domain\username. You can actually check how the correct format is if you go to tools->user roles->click add->select the usernames checkbox->click on the button to the right and search for a user. after inserting you'll see the format in the user names field. Actually i believe that you tried that already so do you have any more information. Do you check if the person is the approver in the OnLoad event with code ?
    Listen to Motörhead cos they play Rock'n Roll :)
  • 06-29-2007 02:34 PM In reply to

    Cool hat!

    I misidentified the problem.  I was finally able to get the User Role to work by using the format domain\name.

    The actually problem was that the User Role did not change for the user who had the form open.  If I put myself in the field it never switched to the new role.  I had to save and then re-open the file.  Is there an event listen to with which I can switch the user role dynamically?

     

  • 07-02-2007 04:05 AM In reply to

    I don't know exactly what you wanna achieve but you could use the OnAfterChange event of your field. Double click your control, click data validation and in the drop down select OnAfterChange event and then edit code. Not sure if that helps you, could you please provide some more detailed information ?
    Listen to Motörhead cos they play Rock'n Roll :)
  • 07-02-2007 11:17 AM In reply to

    I want to switch the current user role based on the user entered by the user.

     So if I have a field named USER and I put in domain\bobsmith and I am Bob Smith then the User Role should switch to the new user role.  Do you have an example of User Role switching in JScript?

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