Hello,
Can someone help with a relevance query for property values and if a property value equals “not set” (system default)? The end goal is to create a action script based on the results
Thanks
Hello,
Can someone help with a relevance query for property values and if a property value equals “not set” (system default)? The end goal is to create a action script based on the results
Thanks
If I’ve read your question correctly then something like this would work:
if {value of setting "x" of client as string = "x"}
action script here
else
exit 100
or if you need it to do multiple thins then maybe
if {value of setting "x" of client as string = "x"}
action script here
elseif {value of setting "x" of client as string = "y" or value of setting "x" of client as string = "z" }
action script here
else
exit 100
Thank you for the response but I am stuck on the relevance
I am looking to return the value of true/false using something like this (taken from a automatic group targeting properties)
((values of settings “settingname” as string as lowercase) contains “”)
So BigFix Properties are just relevance statements. You do not (in client-evaluated relevance) reference a BigFix Property by name to retrieve it’s value.
For example, the reserved BigFix Property OS is defined as the relevance operating system
. If you want to reference the value the endpoint returns for OS in anything that runs on the client, you must use the relevance that is defined for that BigFix Property. Lets say you are trying to do something only if the OS value starts with Win10, you can accomplish this with:
exists operating system whose (it as string starts with "Win10")
or in actionscript:
if {exists operating system whose (it as string starts with "Win10")}
// This is the actionscript to run if the endpoint is Windows 10
else
// This is the actionscript to run if the endpoint is not Windows 10
endif
This relevance statement will result in a True if and only if the OS property value returned by the endpoint starts with the string “Win10”.
Now say you have another property in your environment called IsWindowsEndpoint (just made up here for an example) that is defined as the relevance expression if (exists properties "windows") then (windows of operating system) else (false)
. This property returns the value True or False. To reference the value of this property in a test condition, since it already returns either a True or False you don’t have to do anything special… just use it as-is:
if (exists properties "windows") then (windows of operating system) else (false)
or within actionscript:
if {if (exists properties "windows") then (windows of operating system) else (false)}
// This is the actionscript to run if true
else
// This is the actionscript to run if false
endif
If this does not address your question, can you provide more details on exactly what your trying to accomplish? Such as if you want to do things based on a BigFix Property you have defined in your environment, can you provide the relevance expression that is associated with that BigFix Property and (if not True/False or a built-in property provided by HCL/BigFix) some sample values returned by that BigFix Property in your environment (at least enough to provide clarity on what your trying to achieve).
exists values whose (it as string as lowercase contains "somevalue") of settings "settingname" of client
Thanks, Mike. Great help.
Much appreciated!