in

InfoPath Dev

Conditional Formatting to Hide Control

Last post 07-24-2008 12:26 PM by srikrushna. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-20-2008 02:09 PM

    Conditional Formatting to Hide Control

    I want a control to always be hidden unless it is one of the three specified users who are in the form.

    So, I added a field that will hold the current user name

    Then, put a condition on the field I want hidden, to be hidden if Current user is not equal to melissam

    That worked just fine. So I proceeded to change the conditional formatting on the control to hide if current user is not equal to user1 or user2 or user3. That conditional formatting did not work. Any suggestions?

  • 06-20-2008 03:49 PM In reply to

    Re: Conditional Formatting to Hide Control

    Your close... you need to use "and" instead of "or". If you use OR, it will ALWAYS hide because the current user will never be equal to all 3 fields unless all 3 fields are identical. 

    currentUser != user1 AND currentUser != user2 AND currentUser != user3 THEN hide control.

     

    Visit my Web site:

    http://www.braintrove.com

    Greg Collins / Microsoft MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-23-2008 10:51 AM In reply to

    Re: Conditional Formatting to Hide Control

    How could i do this using a sharepoint list of users?  I have the data connection set up and i'm trying to use a condition similar to this.

  • 07-24-2008 12:26 PM In reply to

    Re: Conditional Formatting to Hide Control

    If the data connection is with sahrepoint "User Information List", "Account" field is the Reference by which we can set the conditional formatting.

    Now set the Conditional formatting to the field which you want to hide this way, saying :

    "If Any occurance of Account" (is not equal) username()

    then hide this control.

    This will hide the control,unless your credential is there in Sharepoint "user information list".

    Hope this works fine.

    Thanks & Regards,
    Srikrushna Patro.
Page 1 of 1 (4 items)
Copyright © 2003-2007 Qdabra Software. All rights reserved.
View our Terms of Use.