User Role Problem - InfoPath Dev
in

InfoPath Dev

User Role Problem

Last post 05-14-2007 12:01 AM by liorlankril. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-13-2007 01:35 AM

    User Role Problem

    I have in my InfoPath form a TextBox control. I want this TextBox to be Enable only to specifice users!!!!

     I created a User role called "Office" and I defind the specific users to this role. (I have only 1 user role so this one is default)

    On the TextBox->Display tab -> Conditional Formatting -> I add the condition "If User's current role Is not equal to "Office" than -> checked the Read-only checkbox

     

    The problem is if user that contained in the list of user for "Office" role open the form, he can write into the TextBox!!!!

     Why? How does it works?

     

     

  • 05-13-2007 09:18 PM In reply to

    If I understand correct you want the user, who is a member of the Office role, to have the field read-only, and everyone else who is not in Office can write to it.  If this is the case than you would want your rule to be if role is equal to Office than read-only.  As you have it stated above, anyone who is not in the Office role, anyone but the user you mention, would have the field read-only.  Memebers of would be the only ones who could write to the field.

    Let me know if I am not understanding this correctly.

    Filed under:
  • 05-13-2007 09:41 PM In reply to

    Hi Clay Fox! you undrastand the oposit from what I mean:

     

    I want that who is NOT a member of the "Office" role, to have the field read-only. That's why I wrote my role to be if role is NOT equal to Office than read-only.

    But it's not work! When everyone open the form (also user which is  not mebers of the role) can write!!!!

    the problem is the role is default role and I aske about current role..... but ofcurse it will always be the current role! there are no more roles.... Am I write?

    How to fix it? 

     

  • 05-13-2007 09:53 PM In reply to

    OK I got it now, I was a bit confused on which users you were refering to where.

    I personally have never used roles. I have always either used a employee's department or some other data as the condition but as far as I know they work.  If you have one user you could check for them explicitly although I believe you are having some issues getting their user name from your other post.

    I will assume you are using the lookup to specify the user and it includes the domain name.  I believe it also needs to be the initiator.

    I just created a blank form, created a "test" role that was Yes for Default and Yes for Initiator and put my account in as a member.  I set a conditional format for User role is equal to "test" shade the field orange. Preview - > the field was orange. I went back to design and switched it to user role not equal shade orange. Preview -> not orange.

    I would check the initiator and do some simple tests.  I am not sure if there is a way to display the users role, I am guessing their probably is, but either the role is not getting turned on when the form is opened or it is not set up right.

    I would do some basic testing and work your way back into it.

    Filed under:
  • 05-13-2007 10:33 PM In reply to

    I did exactly the test you did and in bpth case I get orange shading
  • 05-13-2007 10:42 PM In reply to

    Interesting.  I am using InfoPath 2007. 

    So it is seeing you as both a member and not a member of the same role, therefore the expression = true and the orange both times.

    Did you try a new blank form and do this from scratch?  If not, I would verify this. Sometimes there can be other rules or conditions at play.

    Hopefully someone else has some ideas.

  • 05-14-2007 12:01 AM In reply to

     

    yes! I try this test on new blank form, and I put in this form only one Textbox and only one user role that contain only one user. On the first time I put my username in the role, and in seconde tiome I put other username. Bu in both case the shading was orange!!!!!

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