Hi,
I would like to display some extra information beside my dropdown on my dashboard. When I select from dropdown menu, it should be displayed dynamically. I used dropdown and text box to get this but no luck. Any inputs are appreciated.
Thanks
Let me give it a shot taking these assumptions below:
1) You have a query that will return you two fields;
Example of one such query can be:
base query | stats count by thisWillBeDisplayedInDropDown, thisWillBeUpdatedInTextBox
You can then use "thisWillBeDisplayedInDropDown" field values to display in drop down list and depending on what value user selected, the value of "thisWillBeUpdatedInTextBox" field will be used to update in the textbox.
Taking above as a reference, please have a look at this code which should give you what you want:
<form>
<label>Dashboard Title</label>
<fieldset submitButton="false">
<input type="dropdown" token="thisIsDropdownToken">
<label>This is DropDown Label</label>
<search>
<query>This query will populate the dropdown| stats count by thisWillBeDisplayedInDropDown, thisWillBeUpdatedInTextBox</query>
<earliest>-4h@m</earliest>
<latest>now</latest>
</search>
<fieldForLabel>thisWillBeDisplayedInDropDown</fieldForLabel>
<fieldForValue>thisWillBeUpdatedInTextBox</fieldForValue>
</input>
<input type="text" token="thisIsTextBoxToken">
<label>This textBox's text will change</label>
<default>$thisIsDropdownToken$</default>
</input>
</fieldset>
</form>
NOTE: Please ensure to click "Search On Change" in both the TextBox and DropDown Input settings when you are configuring the Inputs (just being cautious )
Below logic didn't work. I tried in other way and achieved solution by creating a panel and showed static values depend upon the selection from drop down.
Thanks for your input. But I'm not looking this functionality. I'm looking to display static text as more info when I select a dropdown right to that. For ex: If I select 2016 from drop down extra message should be displayed right to the drop down like "It is a Year". If I select another value it should populate another message w.r.t that.
2016
July
if(eval $dd$=2016) It is a Year
if(eval $dd$=July) Month
That should be easier if you already know what static values you have and what static values you want to output when user selects. Try this then:
<form>
<label>Answers</label>
<fieldset submitButton="false">
<input type="dropdown" token="thisIsDropdownToken" searchWhenChanged="true">
<label>This is DropDown Label</label>
<choice value="It is a year">2016</choice>
<choice value="It is a year">2017</choice>
<choice value="Month">July</choice>
<choice value="Month">June</choice>
</input>
<input type="text" token="thisIsTextBoxToken">
<label>This textBox's text will change</label>
<default>$thisIsDropdownToken$</default>
</input>
</fieldset>
</form>