I have a question that I can’t think of a direct answer off top of my head and I was hoping someone has a suggestion. Is there a way to convert a text read from a file as a string to relevance and force the client to evaluate it?
I have a config file in my case in json format but the format/source doesn’t really matter, the point is that it is read from outside as a string.
{
"Version": "1.0",
"Windows": {
"ECO": "CHxxxxxxxxx",
"Start": "Fri, 13 Feb 2026 20:00:00",
"End": "Mon, 16 Feb 2026 06:00:00",
"Scope": "windows of operating system and device type = \"Server\""
"Description": "All Windows server versions"
},
"OracleLinux": {
"ECO": "TBD",
"Start": "TBC",
"End": "TBC",
"Description": "All Oracle Linux versions"
}
}
I can easily read that back as:
(it as string) of value of key "Scope" of value of key "Windows" of json of file "..."
but is there an easy way to convert it to relevance from string and get the client to return the result of the relevance (whatever it is, in the above example it should be True/False in boolean type) rather than the string.
Mmmm, is that like a dynamic property where the result wouldn't be based on a static relevance expression defined by an operator?
I can’t think of any way of doing that via pure relevance as I’m not aware of anything like a “results of expression ” type operator, but, and this may not be what you are after, maybe it could be accomplished as an action by levering the local qna.exe to evaluate the expression parsed from the file, then output to a file which is then read by a property, albeit this would be a somewhat detached process.
Action
createfile until EOF
q: {line 1 of file "C:\temp\myquery.txt"}
EOF
delete C:\temp\myquery.qna
copy __createfile C:\temp\myquery.qna
waithidden cmd.exe /c "{pathname of file "qna.exe" of storage folder of client as string}" C:\temp\myquery.qna > C:\temp\results.qna
To read the output from qna
following texts of firsts "A: " of lines whose (it as uppercase starts with "A:") of file "C:\temp\results.qna"
By changing the expression in “myquery.txt” (or in your case your json file) as the action reruns the results in “results.qna” would change which then get reflected in the property when that next refreshes.
I was even thinking of using it a relevance of an open policy if there is a way to make it dynamic:
if ("Scope" as relevance = True) then (...) else (...)
and create purely externally controlled parameters to change the behaviour of open policies without having to hardcode anything. So today (back to the examples) the action automatically targets all Windows Servers; tomorrow I just tweak the config file and targets all Windows workstations/laptops; or maybe all Domain Controllers; or whatever.
What you have is good if the relevance is required within execution though!
What I came up with myself makes it a bit semi-automated is instead of putting the full relevance in the Scope parameter, maybe I can put the ID of a computer group and I change the relevance on the group level, so my relevance is still “somewhat dynamic” in the sense that I don’t have to recreate the policy to change the target/scope but it makes things not as tidy (multiple places to change manually) just do:
if (member of group (parameter "Scope" as integer) of site "NameOfSite") then (...) else (...)