I have an XML form that has a select box control that allows users to select the fields they want displayed in the output table. The selected options are stored in a token called "$fields$". The input is set to search on change.
In the dashboard, if I use |table $fields$ at the end of my search, the results table is updated every time a field is checked or unchecked, which is the action I'm looking for. However, the limitation of this is that I can't remove fields the users don't need to see if I want to keep them for drilldown.
As an alternative, I tried adding the fields tag, with $fields$ for the list and removing the table command. This effectively works at hiding the extra columns and keeping the data so that I can use it for drilldown, but it doesn't update dynamically as they are selecting/unselecting the field names.
A limited version of my xml is below (with some choices removed, just for brevity)
______________________The select box______________________
<input type="checkbox" id="input_checkbox_horizontal1" searchWhenChanged="true" depends="$vsmacro$" token="fields">
<label>Select Fields to Display</label>
<choice value=""VM Team Message"">VM Team Message</choice>
<choice value=""Last Observed"">Last Observed</choice>
<choice value=""IP Address"">IP Address</choice>
<choice value=""See Also"">See Also</choice>
<choice value=""CVSS Base Score"">CVSS Base Score</choice>
Notes","Note Expiration"">SLM Notes Information</choice>
<default>"""Last Observed""","""Severity""","""IP Address"""</default>
<initialValue>"Last Observed","Severity","IP Address",</initialValue>
_____________________the tables option________________
<query>[...a working search....] |table Directives $fields$ </query>
This will automatically update (I'd assume because of the searchWhenChanged control on the box.)
_____________the fields option ________________
<search id="MySearch" base="BaseSearch">
<query>|[...a working search...]
[...removed a bunch of other "option" tags"...]
[...removed all the drilldown conditions...]
Any help you might be able to provide is appreciated!!!!
... View more