What's wrong with this statement?

parameter "NetLocation" = "{ IF (Exists registration subnet address of client) THEN (Registration Subnet Address of Client as String) ELSE ("Internet") }"

I originally had

parameter "NetLocation" = "{ (registration subnet address of client)|"Internet"}"

and got the same error. The Fixlet Debugger evaluates the Relevance correctly, but when I add it to the Action in a Task, it will not process correctly.

I should be able to work around the problem by switching the logic to an Action script If/else statement, but given that the clause between the curly brackets is a valid Relevance Statement, why will it not process correctly in an Action? I keep getting the following error message in the client log …

ActionLogMessage: (action:535833) Parameter command error.  Syntax should be 'parameter "n"="v"' and parameter may not already be defined.

I believe the issue may be due to the space after the parameter name, and before the parameter value. Can you try:

parameter “NetLocation”=“{ IF (Exists registration subnet address of client) THEN (Registration Subnet Address of Client as String) ELSE (“Internet”) }”

2 Likes

That worked. Thanks!

Could have sworn I tried that! :smile:

Now I have to go back through the Task and remove the workaround I wrote into it!

1 Like

This does seem like a much too easy mistake to make. Seems like an RFE to allow arbitrary spaces around the = is in order.

1 Like

This is strange. I always have spaces between the = when setting parameters, and all my tasks work. The 9.2 documentation even shows it that way in their examples. Is this something that has changed in newer versions? If so that’s going to break pretty much all my custom content

reference:

.

The parameter command can be used to create new action variables during the
execution of the action. It takes the form:
parameter “x” = “{expression}”

1 Like

Greetings from 2024!

Was the issue of spaces on either side of the = ever settled? The developer guide remains inconsistent:
https://developer.bigfix.com/action-script/reference/flow-control/parameter.html

FWIW, I’ve opened a git issue in the parameter documentation.