Answer by warren for How do i set a token based on the dropdown options in splunk dashboard

Try doing an eval in your search proper:

<search>
  <query>... | eval endpoint="/$service$/$environment$" | ...

Or try doing an <eval>...</eval> on change from both dropdowns:

<input type="dropdown" token="service" searchWhenChanged="true">
  <label>service</label>
  <choice value="capi">capi</choice>
  <choice value="crapi">crapi</choice>
  <choice value="oapi">oapi</choice>
  <default>capi</default>
  <initialValue>capi</initialValue>
  <change>
    <eval token="endpoint">"/"+$service$+"/"+$environment$</eval>
  </change>
</input>

<input type="dropdown" token="environment" searchWhenChanged="true">
  <label>Environment</label>
  <choice value="prod">prod</choice>
  <choice value="ppe">ppe</choice>
  <choice value="pte">pte</choice>
  <choice value="dev">dev</choice>
  <default>prod</default>
  <initialValue>prod</initialValue>
  <change>
    <eval token="endpoint">"/"+$service$+"/"+$environment$</eval>
  </change>    
</input>

from User warren – Stack Overflow https://stackoverflow.com/questions/62588370/how-do-i-set-a-token-based-on-the-dropdown-options-in-splunk-dashboard/62594826#62594826
via IFTTT