Dashboards & Visualizations

How to extract the text of the choices from a drop-down form?

dbcase
Motivator

Hi,

I have the below XML code which works just fine. What I'd like to do is somehow capture the text of the choice (i.e. BETA, BHN, Comcast A, etc) so I can have another drop-down in another panel have the same choice prepopulated. I can capture the choice value easy enough, but I need to get the text, not the choice value. Is there anyway to do that?

input type="dropdown" token="mso_environment" searchWhenChanged="true">
      <label>Select a MSO:</label>
      <default>BETA</default>
      <choice value="wls">BETA</choice>
      <choice value="sev1_bhn">BHN</choice>
      <choice value="sev1_comcasta">Comcast A</choice>
      <choice value="sev1_comcastb">Comcast B</choice>
      <choice value="sev1_comporium">Comporium</choice>
      <choice value="sev1_coxbusiness">Cox Business</choice>
      <choice value="sev1_coxhomelife">Cox Home Life</choice>
      <choice value="sev1_itscom">Itscom</choice>
      <choice value="sev1_peq">PEQ</choice>
      <choice value="sev1_rogersbusiness">Rogers Business</choice>
      <choice value="sev1_rogersresidential">Rogers Residential</choice>
      <choice value="sev1_timewarner">Time Warner</choice>
      <choice value="sev1_telstra">Telstra</choice>
    </input>
0 Karma
1 Solution

sundareshr
Legend

Try like this

 <input type="dropdown" token="compare_mso" searchWhenChanged="true">
         <label>Select a MSO to Compare Against:</label>
         <default>'$mso_environment.label$'</default>
         <choice value="wls">BETA</choice>
         <choice value="bhn">BHN</choice>
         <choice value="comcasta">Comcast A</choice>
         <choice value="comcastb">Comcast B</choice>
         <choice value="comporium">Comporium</choice>
         <choice value="coxbusiness">Cox Business</choice>
         <choice value="coxhomelife">Cox Home Life</choice>
         <choice value="itscom">Itscom</choice>
         <choice value="peq">PEQ</choice>
         <choice value="rogersbusiness">Rogers Business</choice>
         <choice value="rogersresidential">Rogers Residential</choice>
         <choice value="timewarner">Time Warner</choice>
         <choice value="telstra">Telstra</choice>
         <change>
           <set token="v">$value$</set>
           <set token="l">$label$</set>
         </change>
       </input>

View solution in original post

sundareshr
Legend

Try like this

 <input type="dropdown" token="compare_mso" searchWhenChanged="true">
         <label>Select a MSO to Compare Against:</label>
         <default>'$mso_environment.label$'</default>
         <choice value="wls">BETA</choice>
         <choice value="bhn">BHN</choice>
         <choice value="comcasta">Comcast A</choice>
         <choice value="comcastb">Comcast B</choice>
         <choice value="comporium">Comporium</choice>
         <choice value="coxbusiness">Cox Business</choice>
         <choice value="coxhomelife">Cox Home Life</choice>
         <choice value="itscom">Itscom</choice>
         <choice value="peq">PEQ</choice>
         <choice value="rogersbusiness">Rogers Business</choice>
         <choice value="rogersresidential">Rogers Residential</choice>
         <choice value="timewarner">Time Warner</choice>
         <choice value="telstra">Telstra</choice>
         <change>
           <set token="v">$value$</set>
           <set token="l">$label$</set>
         </change>
       </input>

dbcase
Motivator

I thought for sure that would work but alas... no joy. I tried the below. Any other thoughts?

$mso_environment.label$
"$mso_environment.label$"
'$mso_environment.label$'

in this xml code

<title>'$mso_environment.label$' BEA Codes for $time_field.earliest$</title>

and

<input type="dropdown" token="compare_mso" searchWhenChanged="true">
        <label>Select a MSO to Compare Against:</label>
        <default>'$mso_environment.label$'</default>
        <choice value="wls">BETA</choice>
        <choice value="bhn">BHN</choice>
        <choice value="comcasta">Comcast A</choice>
        <choice value="comcastb">Comcast B</choice>
        <choice value="comporium">Comporium</choice>
        <choice value="coxbusiness">Cox Business</choice>
        <choice value="coxhomelife">Cox Home Life</choice>
        <choice value="itscom">Itscom</choice>
        <choice value="peq">PEQ</choice>
        <choice value="rogersbusiness">Rogers Business</choice>
        <choice value="rogersresidential">Rogers Residential</choice>
        <choice value="timewarner">Time Warner</choice>
        <choice value="telstra">Telstra</choice>
      </input>
0 Karma

sundareshr
Legend

Try updated answer

0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...