Using "run only when" to contrain actions

Hello All,

I’m using the “Run only when” feature when taking an action. Does it only compare string values with this feature (no boolean or integer values)? And, what is the difference between “matches” and “=”

Thanks

The Run Only When feature gets translate to relevance so you can give it a shot and look at the resulting action to see how it translates!

To do this simply push out the action to a test client and check C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\mailboxsite for the action and open it up and look at action-activation-constraint

I tried this first, run only when "DNS Name" matches "5555":
action-activation-constraint: (((if ( exists true whose (if true then exists dns name else false) ) then dns name else "") as string) as lowercase) equals (("5555") as lowercase)

I then tried this, run only when "DNS Name" matches "testtest":
action-activation-constraint: (((if ( exists true whose (if true then exists dns name else false) ) then dns name else "") as string) as lowercase) equals (("testtest") as lowercase)

So it looks like match just does a case insensitive string equals.

In the case of equals I tried run only when "DNS Name" = 5555":
action-activation-constraint: numeric value of ((if ( exists true whose (if true then exists dns name else false) ) then dns name else "") as string) = numeric value of "5555"

In the case of equals I tried run only when "DNS Name" = testtest":
action-activation-constraint: numeric value of ((if ( exists true whose (if true then exists dns name else false) ) then dns name else "") as string) = numeric value of "testtest"

So from what I can tell equals (as well as > < <= >=) should only be used for a numerical value. Matches does a string comparison (as well as contains, starts with, ends with, etc).

Another thing to note is the relevance of the property you pick is copied at the time you take action. So if you are using a custom property and you change it later you’ll have to redo actions.

3 Likes

Bill, I just wanted to say this is an awesome in depth explanation! :heart_eyes:

1 Like