2 Replies Latest reply on Dec 11, 2013 6:37 PM by projay

    Question on Privilege Set

    projay

      Title

      Question on Privilege Set

      Post

           So when writing a IF statement as shown below is that not valid by having "or" between them.

           That script works only when I refer it to one option in other words removing "or" and everything after it.

           Only works this way: If[$$privset ≠ "[Full Access]"

           Does not work: If"[$$privset ≠ "[Full Access]" or $$privset  ≠ "[Full Access Owner]"

           Am I missing something here?

           Thanks  -J

      edit_order.jpg

        • 1. Re: Question on Privilege Set
          philmodjunk

               $$privset ≠ "[Full Access]" or $$privset  ≠ "[Full Access Owner]"

               will always be true. Any value you select for $$Privset will be true for either the first term, the second term or both.

               Examples:

               1) say $$Privset is "[Full Access]" then

               $$privset ≠ "[Full Access]" is False, $$privset  ≠ "[Full Access Owner] is True and thus False OR True evaluates as True.

               2) say $$Privset is "[Full Access Owner]" then

               $$privset ≠ "[Full Access]" is True, $$privset  ≠ "[Full Access Owner] is False and thus True OR False evaluates as True.

               3) say $$Privset is "Data Entry" then

               $$privset ≠ "[Full Access]" is True, $$privset  ≠ "[Full Access Owner] is True and thus True OR True evaluates as True.

               Use one of the following expressions instead:

               $$privset ≠ "[Full Access]" AND $$privset  ≠ "[Full Access Owner]"

               or

               Not PatternCount ( "[Full Access][Full Access Owner]" ; $$Privset )

               These will evaluate as True only if the privilege set is neither Full Access nor Full Access Owner.

          • 2. Re: Question on Privilege Set
            projay

                 You Da Man Phil......makes perfect sense.  I pulled my hair out trying to figure out what was going on.