How to dynamically generate token value based on the input entered in Splunk?

How to dynamically generate token value based on the input entered in Splunk?

Sample Code:

<input type="text" token="Degree">
  <label>Instance</label>
  <default>ENTER_THE_DEGREE</default>
  <change>
    <condition match="like(lower($value$),&quot;cs%&quot;)">
      <set token="DegreeFullForm">Computer Science - upper($value$)</set>
    </condition>
    <condition match="like(lower($value$),&quot;it%&quot;)">
      <set token="DegreeFullFormegree">Information Technology - upper($value$)</set>
    </condition>
  </change>
</input>

For input token Degree, if the value is entered as cs or CS, then DegreeFullForm token value will be set as Computer Science – CS.
For input token Degree, if the value is entered as it or IT, then DegreeFullForm token value will be set as Information Technology – IT.

Leave a Reply