I have a multi-select Drilldown input in XML format .The page has pie chart when u click on the value it drills down those values to a table .I want to reset it everytime whenever I select the clear filter button on the page .I have written one XML code .
<input type="link" token="reset_tok" searchWhenChanged="true" depends="global_active_search">
<label></label>
<choice value="reset">Clear Filters</choice>
<change>
<set token="reset_tok">*</set>
<unset token="form.asset_id"></unset>
<unset token="form.ticket_type"></unset>
<unset token="form.owner_names"></unset>
<unset token="form.config_item"></unset>
<unset token="form.crossapplication"></unset>
<unset token="form.bucket_label"></unset>
<set token="form.time.earliest">-13mon@mon</set>
<set token="form.time.latest">@mon</set>
</change>
</input>
But I am able to clear or unset the token only once .What should be done if I want it to be clearing the token whenever I select??
@chitreshakumar, please try the following checkbox input instead of link. Ideally you should add Reset button through HTML panel and code token unset through Simple XML JS Extension.
PS: Checking Clear Tokens
resets the token and then removes the check (unsets the checkbox form token after unsetting other tokens i.e. <unset token="tokClear"></unset><unset token="form.tokClear"></unset>
)
<input type="checkbox" token="tokClear" searchWhenChanged="true">
<label></label>
<change>
<condition value="reset">
<unset token="asset_id"></unset>
<unset token="ticket_type"></unset>
<unset token="owner_names"></unset>
<unset token="config_item"></unset>
<unset token="crossapplication"></unset>
<unset token="bucket_label"></unset>
<unset token="reset_tok"></unset>
<unset token="form.reset_tok"></unset>
<set token="time.earliest">-13mon@mon</set>
<set token="time.latest">@mon</set>
<unset token="tokClear"></unset>
<unset token="form.tokClear"></unset>
</condition>
</change>
<choice value="reset">Clear Tokens</choice>
<delimiter> </delimiter>
</input>
@chitreshakumar, please try the following checkbox input instead of link. Ideally you should add Reset button through HTML panel and code token unset through Simple XML JS Extension.
PS: Checking Clear Tokens
resets the token and then removes the check (unsets the checkbox form token after unsetting other tokens i.e. <unset token="tokClear"></unset><unset token="form.tokClear"></unset>
)
<input type="checkbox" token="tokClear" searchWhenChanged="true">
<label></label>
<change>
<condition value="reset">
<unset token="asset_id"></unset>
<unset token="ticket_type"></unset>
<unset token="owner_names"></unset>
<unset token="config_item"></unset>
<unset token="crossapplication"></unset>
<unset token="bucket_label"></unset>
<unset token="reset_tok"></unset>
<unset token="form.reset_tok"></unset>
<set token="time.earliest">-13mon@mon</set>
<set token="time.latest">@mon</set>
<unset token="tokClear"></unset>
<unset token="form.tokClear"></unset>
</condition>
</change>
<choice value="reset">Clear Tokens</choice>
<delimiter> </delimiter>
</input>
Hello @niketn !! Thanks for answering!!
It worked after I added form to asset_id .One more thing I would like to add "I have a pie chart when I click on one of the values of pie ,it shows the values corresponding to that "These tokens are corresponding to those pie charts .
<unset token="bucket_label"></unset>
@chitreshakumar , sorry I was testing few things on local machine using <init>
to default token, so did not have form token to reset in local 😉 Glad you were able to figure out. (Y)
Only two changes you needed were to 1) convert Link input to Checkbox and (2) unset check box value also after unsetting the remaining tokens.
Thanks man!! It worked