Formatting output of Session relevance

Hello BigFix,

I have the following relevance statement below:

((unique values of names of it, operating system of it, last report time of it) of applicable computers whose (operating system of it starts with "Win2" AND last report time of it > (now - 15 * day) AND ((value of result from (bes property "Patch Window") of it contains "THU") OR (value of result from (bes property "Patch Window") of it contains "FRI"))) of it, name of it) of bes fixlets whose (fixlet flag of it AND display name of site of it starts with "Patches" AND source severity of it as lowercase = "critical" AND name of it starts with "MS24-SEP")

And the output that I am getting is:
( ServerName01, Win2022 10.0.20348.2655 (21H2), ( Mon, 23 Sep 2024 23:55:59 +0800 ) ), MS24-SEP: Cumulative Update for Microsoft server operating system version 21H2 - Windows Server 2022 - KB5042881 (x64)
( ServerName02, Win2022 10.0.20348.2655 (21H2), ( Mon, 23 Sep 2024 23:26:57 +0800 ) ), MS24-SEP: Cumulative Update for Microsoft server operating system version 21H2 - Windows Server 2022 - KB5042881 (x64)

I wanted to get rid of the extra parenthesis int the results so that it would look something like:

ServerName01, Win2022 10.0.20348.2655 (21H2), Mon, 23 Sep 2024 23:55:59 +0800, MS24-SEP: Cumulative Update for Microsoft server operating system version 21H2 - Windows Server 2022 - KB5042881 (x64)

So that it would appear as CSV format. Is it possible to format it this way?

Thank you.

Generally the parentheses are just a function of the Fixlet Debugger, to display which things are really ‘item 0’, ‘item 1’, etc. when the item itself may have commas or parentheses embedded. It probably won’t display that way when you use this in a REST API or dashboard.

If it does, though, one way to handle it would be

concatenation ", " of (item 0 of it; item 1 of it; item 2 of it) of ((unique values....

That puts the entire result into a single concatenated string, so there’s no escaping for ‘item 0’, ‘item 1’, etc.

1 Like

Hello Jason,

Thank you for this info. This is good to know.

We do not have any platform yet to use the API data that we are getting. Initially we are planning to use google sheets. For now, we will just use string manipulation while the API connection has not been setup yet.