I may be wrong, but I don't think the submit button will work in the form section. I think you'd want it in the fieldset like this: <fieldset submitButton="true" autoRun="false"> For #3 - I'm n...
See more...
I may be wrong, but I don't think the submit button will work in the form section. I think you'd want it in the fieldset like this: <fieldset submitButton="true" autoRun="false"> For #3 - I'm not 100% sure what you're asking, but I think you mean that you'd want "*-test-target" and "*-test-product" if test is selected from environment and "*-prod-target"/ "*-prod-product" if prod is selected? You can add conditions to change based on environment and use a base search to populate it. However, FYI this dropdown won't populate until after you hit submit if you leave the drop down in the fieldset with the submit button. <search id="token_base">
<query>
| makeresults
| eval token_name="name,address,ALL,Target,Product"
| eval token_name=split(token_name, ",")
| stats count by token_name
| fields - count
| eval token_value=CASE(token_name="name", "name,0", token_name="address", "address,0", token_name="ALL", "ALL", token_name="Target", "$target_tok$", token_name="Product", "$product_tok$")
</query>
</search>
<fieldset submitButton="true" autoRun="false">
<input type="dropdown" token="indexToken1" searchWhenChanged="false">
<label>Environment</label>
<choice value="prod,prod">PROD</choice>
<choice value="np,test">TEST</choice>
<change>
<condition value="prod,prod">
<set token="target_tok">*-prod-target</set>
<set token="product_tok">*-prod-product</set>
<eval token="stageToken">mvindex(split($value$,","),1)</eval>
<eval token="indexToken">mvindex(split($value$,","),0)</eval>
</condition>
<condition value="np,test">
<set token="target_tok">*-test-target</set>
<set token="product_tok">*-test-product</set>
<eval token="stageToken">mvindex(split($value$,","),1)</eval>
<eval token="indexToken">mvindex(split($value$,","),0)</eval>
</condition>
</change>
<default>np,test</default>
</input>
<input type="dropdown" token="entityToken" searchWhenChanged="false">
<label>Data Entity</label>
<choice value="name,0">name</choice>
<choice value="targetProduct,*-test-target">Target</choice>
<choice value="product,*-test-product">Product</choice>
<choice value="address,0">address</choice>
<choice value="ALL">ALL</choice>
<change>
<condition value="ALL">
<set token="entityTokenFirst">*</set>
</condition>
<condition>
<!-- Split the value and set tokens for both parts -->
<set token="entityLabel">$label$</set>
<eval token="searchName">mvindex(split($value$, ","),1)</eval>
<eval token="entityTokenFirst">mvindex(split($value$, ","),0)</eval>
</condition>
</change>
</input>
<input type="dropdown" token="example_tok">
<label>Example dynamic dropdown</label>
<search base="token_base">
<query/>
</search>
<fieldForLabel>token_name</fieldForLabel>
<fieldForValue>token_value</fieldForValue>
</input>
<input type="time" token="timeToken" searchWhenChanged="false">
<label>Time</label>
<default>
<earliest>-24h@h</earliest>
<latest>now</latest>
</default>
</input>
</fieldset>