I’ve written a relevance statement that works fine on its own, but seems to fail when joined with the autogenerated statement.
First, the autogenerated relevance: (if(name of operating system starts with "Win") then free space of drive of client > 61238484 else if ((mac of it) of operating system) then free space of filesystem of folder (pathname of client) > 61238484 else free space of filesystem of client > 61238484)
Then, my relevance: if (exists key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" of (x64 registries)) then ((value "Printer Driver" of it as string as lowercase contains "hp universal printing pcl 6") of (keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" of (x64 registries))) else False
You can see that when run individually, they both return true on a target machine:
((if(name of operating system starts with "Win") then free space of drive of client > 61238484 else if ((mac of it) of operating system) then free space of filesystem of folder (pathname of client) > 61238484 else free space of filesystem of client > 61238484)) AND (if (exists key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" of (x64 registries)) then ((value "Printer Driver" of it as string as lowercase contains "hp universal printing pcl 6") of (keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" of (x64 registries))) else False)
Yes, that is by design. Clause of type “plural boolean” is not handled by clients…(within Fixlet Debugger Ctl + I will show you the type). In your case the reg key would return “plural boolean” that would cause this problem… You need to convert it to singular boolean and then add it as a clause to a fixlet.
q: (if (exists key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" of (x64 registries)) then ((value "Printer Driver" of it as string as lowercase contains "hp universal printing pcl 6") of (keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" of (x64 registries))) else False)
A: False
T: 0.376 ms
I: plural boolean
Try writing it like this and then stick it in the fixlet
q: exists key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" whose (exist value "Printer Driver" whose (it as string as lowercase contains "hp universal printing pcl 6") of it) of (x64 registries)
A: False
T: 0.220 ms
I: singular boolean
I would also consider putting the relevance @ageorgiev suggested in with the disk space check. Reason being you have a disk space check for Windows and Mac then a statement that will error if process on a Mac so you would not be able to use it on Mac…assuming that may be a requirements as you have a disk space check for Mac
Something like
Q: (if(name of operating system starts with "Win") then ((free space of drive of client > 61238484) and (exists key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" whose (exist value "Printer Driver" whose (it as string as lowercase contains "hp universal printing pcl 6") of it) of (x64 registries))) else if ((mac of it) of operating system) then free space of filesystem of folder (pathname of client) > 61238484 else free space of filesystem of client > 61238484)
A: False
T: 0.455 ms
I: singular boolean
If you won’t be using it on Mac, maybe remove that part complete and have relevance 1 in your fixlet/task as windows of operating system
Relevance 1 windows of operating system
Relevance 2 free space of drive of client > 61238484
Relevance 3 exists key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Pharos Secure Printer" whose (exist value "Printer Driver" whose (it as string as lowercase contains "hp universal printing pcl 6") of it) of (x64 registries)
This is great, thank you! Had no idea about plural vs. singular booleans, or how to display them in the Fixlet Debugger.
I was also able to change the last keys in my statement to key to make it a singular boolean. Thank you for the better written relevance — I’ll adapt the format going forward.
Thanks! It’s just for Windows, so I’d normally add the OS check, but I was confused by the behavior (thought surely, True AND True = True). Glad to report it’s all cleaned up and working now.