Generated Relevance Incorrect

(imported topic written by MBARTOSH)

I have the following relevance code that checks out OK in the the fixlet debugger, but when I run it in a task generated by the Software Distribution Dashboard, the combined relevance is not correct. I ran each relevance item separately and they all worked, but combined do not.

My Relevance: (no syntax errors)

if exists file ((value of variable “ALLUSERSPROFILE” of environment) & “\Desktop\HR Quick Source.lnk”) then “true” else if exists file ((value of variable “PUBLIC” of environment) & “\Desktop\HR Quick Source.lnk”) then “true” else “false”

Relevance Created from the Action: (syntax errors)

((((((
if
(name
of
operating system
starts with

“Win”
)
then
free space
of
drive
of
client

680

else

if
((mac
of

it
)
of
operating system)
then
free space
of
filesystem
of
folder (pathname
of
client)

680

else
free space
of
filesystem
of
client

680
))
AND
(version
of
client

=

“8.1”
))
AND
((((name
of

it

as
lowercase

“winxp”

as
lowercase )
OR
(name
of

it

as
lowercase

“win7”

as
lowercase ))
of
operating system)))
AND
(version
of
client

=

“8.2”
))
AND
(windows
of
operating system
AND
(
if
( name
of
operating system
starts with

“Win”
)
then
platform id
of
operating system
!=

3

else

true
)))
AND
(
if

exists
file ((value
of
variable
“ALLUSERSPROFILE”

of
environment)
&

“\Desktop\HR Quick Source.lnk”
)
then

“true”

else

if

exists
file ((value
of
variable
“PUBLIC”

of
environment)
&

“\Desktop\HR Quick Source.lnk”
)
then

“true”

else

“false”
)

(imported comment written by MBARTOSH)

The problem with the custom relevance above is that the true and the false are in quotes which make the result a string value rather than a boolean value.

When all of the releance statements in the task were combined when the task was taken in an action, the relevance did not evaluate correctly because my custom relevance statement needed to be boolean. The task ran and returned “not relevant”.

A nice enhancement would be to prevent a task from being saved if the combination of all of the relevance statements produces an error.