none
Rule not work: logged in user compared to list of users RRS feed

  • Question

  • Good Day,

    I have a field that I am displaying or not displaying depending if the user logged in is one of the people in the rule; for example the rule looks like this:

    Condition:
    loggedInUser != User1 or
    loggedInUser != User2 or
    loggedInUser != User3 or

    Rule type:
    Formatting [disable control]

    loggedInUser has a default value of "PropertyData[Name = "FirstName"]/Values/ValueData/Value" and when I test it displays the correct logged in user.

    What is happening is that when I login with User1 or any of the approved user the field is disabled.

    Any help is appreciated, thank you,
    Hyde

    MOSS 2007 | 1 WFE | InfoPath 2010 | SQL 05

    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.
    Wednesday, March 16, 2011 6:26 PM

Answers

  • I would use the userName() function to set the loggedInUser field's default value. Not sure what you are doing with the PropertyData. Maybe the domain is part of one value but not your condition (e.g. DOMAIN\User1 vs. User1) ??

    -=Steve

    • Marked as answer by Leoyi Sun Tuesday, March 29, 2011 9:41 AM
    Wednesday, March 16, 2011 6:52 PM
  • As a test, change your rule to compare only 1 user (instead of all three).  If that works make each condition a separate condition instead of having it as one with the "or" statement.
    • Marked as answer by Leoyi Sun Tuesday, March 29, 2011 9:41 AM
    Thursday, March 17, 2011 5:31 PM

All replies

  • I would use the userName() function to set the loggedInUser field's default value. Not sure what you are doing with the PropertyData. Maybe the domain is part of one value but not your condition (e.g. DOMAIN\User1 vs. User1) ??

    -=Steve

    • Marked as answer by Leoyi Sun Tuesday, March 29, 2011 9:41 AM
    Wednesday, March 16, 2011 6:52 PM
  • Thanks for the quick reply. It was previously getting the value of the logged in user, but I changed it anyway as you suggested and it didn't make a difference.  Thanks again.

    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.
    Wednesday, March 16, 2011 7:00 PM
  • I did some checking and we are also using 'GetUserMemberships'  that is not pulling back any data, but when I check 'GetUserProfileByName' that IS pulling back information.  Does anyone know of another service that will get the AD memberships besides 'GetUserMemberships'?

    Thanks,
    Hyde


    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.
    Thursday, March 17, 2011 3:16 PM
  • As a test, change your rule to compare only 1 user (instead of all three).  If that works make each condition a separate condition instead of having it as one with the "or" statement.
    • Marked as answer by Leoyi Sun Tuesday, March 29, 2011 9:41 AM
    Thursday, March 17, 2011 5:31 PM