Knowledge Management

How to pass token form one text box to another text box?

manjuase
Explorer

Hi,

I have two text boxes textbox1 with token name 'texttok' and

textbox2 with token name 'cputok'

Now, i want to set 'cputok' token with the value of 'texttok' when that 'texttok' token met some condition.

Any suggestion?

Tags (1)
0 Karma

niketn
Legend

As far as you are not going to set the value from the second text box, you can use initialValue and default properties of the second text box to fetch value from first text box on its change event.

In the following example I am looking for Text Box 1 value to be test to be populated to second text box.

<input type="text" token="textBox1" searchWhenChanged="true">
   <label>Text Box 1</label>
   <change>
       <condition match="$value$==&quot;test&quot;">
            <set token="texttok">$value$</set>
       </condition>
   </change>
</input>
<input type="text" token="cputok" searchWhenChanged="true">
   <label>Text Box 2</label>
   <default>$texttok$</default>
   <initialValue>$texttok$</initialValue>
</input>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...