Getting Data In

Parse multiple default or initial Values to Text form input

GGMJhgitR
New Member

Hello Community,

My Problem:

I have a Dashboard, where I want to parse multiple default or initial Values to a Text Form Input.
I know I could use a checkbox or a multiselect input, but in my Case that won't help because there are to many Values. (Then the input box will take Place over my whole Screen)

For Example I want this:

  <label>Enter a Service</label>
  <prefix>(</prefix>
  <suffix>)</suffix>
  <valuePrefix>service="</valuePrefix>
  <valueSuffix>"</valueSuffix>
  <delimiter> OR </delimiter>
  <choice value="HTTP">"HTTP"</choice>
  <choice value="FTP">"FTP"</choice>
  <choice value="SMTP">"SMTP"</choice>
  <choice value="SMB">"SMB"</choice>
  <choice value="udp_445">"UDP_445"</choice>
  <choice value="tcp_445">"TCP_445"</choice>
  <choice value="tcp_8080">"TCP_8080"</choice>
  <initialValue>HTTP,FTP,SMTP,SMB,udp_445,tcp_445,tcp_8080</initialValue>

Like in this Example (last Line) I want to parse multiple (But not all) Values to an Input but instead of using a Checkbox or a Multiselect input I want to have it as a Text Form Input.

Or can I for example set up a Variable with all the needed Values and use the Variable as the default/initial Value?

Sorry for my bad English and thanks in advance. 🙂

0 Karma

sundareshr
Legend

You can specify a comma separated list of values as default/initial value for a text box, like this

    <input type="text" token="field1">
      <label>field1</label>
      <default>one, two, three, four</default>
    </input>   

How do you plan to use this?

0 Karma

GGMJhgitR
New Member

Thanks for the quick reply. But this didn't seems to work for me.

I want to search, in the logs comming from the Firewall, for entries that contain specified PolicyIDs(specified by the default value of the user Input or by the Input that a user types in). Because there are so many IDs i can't use multiselect or a checkbox, because that will fill the whole screen and the user didn't have a real overview, if he has to select between 50 or more checkboxes.

What i basically want is this:

  <input type="text" token="policyid">
      <label>Enter a Policy ID</label>
  <default>1, 2, 3, 4, ...</default>
      </input> 

In my search string i've tried both.

policyid=$policyid$ (For a Text Form input) and $policyid$ (For a Multiselect or Checkbox input).

But this didn't seems to work.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...