Hi I have this XML code
<input type="dropdown" token="mso_selection">
<label>Select a MSO</label>
<search>
<query>index=wholesale_app sourcetype=wholesale_mobile_app | spath buildTarget | dedup buildTarget</query>
<earliest>-1d</earliest>
<latest>now</latest>
</search>
<fieldForLabel>buildTarget</fieldForLabel>
<fieldForValue>buildTarget</fieldForValue>
</input>
<input type="radio" token="Product_token">
<label>Select a Product</label>
<choice value="All">All</choice>
<choice value="Converge">Converge</choice>
<choice value="Touchstone">Touchstone</choice>
<default>All</default>
<change>
<condition value="All">
<set token="productsearchquery">[search index=wholesale_app buildTarget=$mso_selection$ analyticType=Checkpoint Properties.index=39 OR Properties.index=40|dedup clientSessionId|table clientSessionId]</set>
<unset token="productsearchquery"></unset>
</condition>
<condition value="Converge">
<set token="productsearchquery">[search index=wholesale_app buildTarget=$mso_selection$ analyticType=Checkpoint Properties.index=39|dedup clientSessionId|table clientSessionId]</set>
<unset token="productsearchquery"></unset>
</condition>
<condition value="Touchstone">
<set token="productsearchquery">[search index=wholesale_app buildTarget=$mso_selection$ analyticType=Checkpoint Properties.index=40|dedup clientSessionId|table clientSessionId]</set>
<unset token="productsearchquery"></unset>
</condition>
</change>
</input>
And then I have this query
<query>index=wholesale_app buildTarget=$mso_selection$ analyticType=SessionStart $productsearchquery$ |lookup phone_models_edited.csv Model AS Properties.platformData.HM
| stats count by Display_model | rename Display_model as "Phone Model" count as Count|sort -Count</query>
And the panel on the dashboard sits there saying waiting for input even after everything is selected. Where am I going wrong?
Found it......
Is it the issue due to <unset token="productsearchquery"></unset>
?
Do you mind posting the solution you found?
Yes, I would like to know the answer too.
HI @dbcase,
You are setting productsearchquery
in all three condition and very next unsetting the same token. Is it right?
<condition value="All">
<set token="productsearchquery">[search index=wholesale_app buildTarget=$mso_selection$ analyticType=Checkpoint Properties.index=39 OR Properties.index=40|dedup clientSessionId|table clientSessionId]</set>
<unset token="productsearchquery"></unset>
</condition>
<condition value="Converge">
<set token="productsearchquery">[search index=wholesale_app buildTarget=$mso_selection$ analyticType=Checkpoint Properties.index=39|dedup clientSessionId|table clientSessionId]</set>
<unset token="productsearchquery"></unset>
</condition>
<condition value="Touchstone">
<set token="productsearchquery">[search index=wholesale_app buildTarget=$mso_selection$ analyticType=Checkpoint Properties.index=40|dedup clientSessionId|table clientSessionId]</set>
<unset token="productsearchquery"></unset>
</condition>
Bcoz, same token productsearchquery
you are using in search query.
<query>index=wholesale_app buildTarget=$mso_selection$ analyticType=SessionStart $productsearchquery$ |lookup phone_models_edited.csv Model AS Properties.platformData.HM
| stats count by Display_model | rename Display_model as "Phone Model" count as Count|sort -Count</query>
Thanks
a bit more information.... if I remove $productsearchquery$ the panel works. So the problem is setting that token somehow but I can't seem to figure out why its not being set....
What is the point of <unset token="productsearchquery"></unset>
after each <set>
?