Concatenation Error

Hi,

I’m trying to include fields in my relevance query but it only seems to work for certain properties otherwise I get a “Error: The operator “concatenate” is not defined.”

(ids of it, "Name: " & name of it, times issued of it, name of issuer of it, (name of computer of it | “n/a”, detailed status of it) of results of it) of bes actions whose (name of it contains “ActionName”)

Regards,

Tony

I’m getting closer but still having issue with Action id and times issued:

("ActionID: " & item 0 of it & " | " & item 1 of it) of (id of it, "Label: " & name of it, times issued of it, "IssuedBy: " & name of issuer of it, ("Target: " & item 0 of it & " | " & item 1 of it) of (name of computer of it | “n/a”, "Status: " & detailed status of it) of results of it) of bes actions whose (name of it contains “ActionName”)

@TonyGF the operator concatenate is only valid for strings. The Action ID is an integer, but it is straightforward to cast it as a string (if of it as string). The Time Issue is a Time object, which can also be cast as a string, but its more complicated due to time zones. See this BigFix Developer page: Time Casts, for your options.

Here’s one option, using the local to the client time:

 ("ActionID: " & item 0 of it & " | " & item 1 of it) of (id of it as string, "Label: " & name of it, times issued of it, "IssuedBy: " & name of issuer of it as local string, ("Target: " & item 0 of it & " | " & item 1 of it) of (name of computer of it | "n/a", "Status: " & detailed status of it) of results of it) of bes actions whose (name of it contains "ActionName")
1 Like

Hi itsmpro92,

Thanks for your response. However I, getting the following error after running the query in presentation debugger:

Error: The operator “local string” is not defined.

Thanks,

Thanks again itsmpro92,

Adding “as string” seems to work

("ActionID: " & id of it as string, "Label: " & name of it, "Issued: " & time issued of it as string, "IssuedBy: " & name of issuer of it, ("Target: " & item 0 of it & " | " & item 1 of it) of (name of computer of it | “n/a”, "Status: " & detailed status of it) of results of it) of bes actions whose (name of it contains “ActioName”)

Thanks for pointing me in the right direction.

How would you concatenate custom properties?

("ComputerName: " & name of it, "ComputerID: " & id of it as string, "IPAddress: " & ip address of it as string, "RootServer: " & root server of it, "OS: " & operating system of it, "LastReportedTime: " & last report time of it as string, "AgentVersion: " & agent version of it, values of results (it, bes property “ServerResponsibilityGroup”), values of results (it, bes property “KISAM_group”), values of results (it, bes property “patch_group”)) of bes computers whose ( name of it as lowercase starts with “ComputerName”)

Everything works except the custom properties:

(it, bes property "SupportGroup: " & “ServerResponsibilityGroup”), values of results (it, bes property "KISAMGroup: " & “KISAM_group”), values of results (it, bes property “patch_group”)) of bes computers whose ( name of it as lowercase starts with “ComputerName”)

A “BES Property” is a complex type with several Attributes. You cannot concatenate a ‘bes property’, but you can concatenate a ‘value of result of bes property’, which is actually how you are referencing all but the ‘SupportGroup’ property in the first query

Hi Jason.

Thank you for your response. Sorry but I’m not really sure what you mean by concatenating the value of results. Would you happen to have an example handy?

Thanks

Hi Jason,

Actually I figured it out.

"Patch Group: " & value of results (it, bes property “_patch_group”))

By changing values of results to value of results did the trick.

Thanks for all of your helpstrong text