I’m trying to do something like the following: Based on hostname string, set a value for a system setting called “Patch_Group”.
I’ve already set my relevance clause which does what I want so when a host becomes relevant, I want to execute an ActionScript.
Here’s an example of my ActionScript:
if (computer name) whose (it as string as lowercase matches (regex “^(sm…d[0-9]+)” as lowercase))
setting “Patch_Group”=“1w” on “{now}” for client
endif
I tried the fixlet debugger, action execution and it completes with no errors. I see my relevant host pop up in the BigFix console and I take action on the host. After a few minutes I see that the action finished(it says “Fixed”) but that system setting does not change. Can somebody tell me what I’m doing wrong?
Thanks.
If the part mentioned is in your actionscript then you need to put relevance statements around it like the below. I added the “exists” as you need to have the statement result in a True and the way you had it you’d get a “computer name” string result instead.
if { exists (computer name) whose (it as string as lowercase matches (regex "^(sm...d[0-9]+)" as lowercase)) }