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!

Fuel Your Journey: What’s Waiting for You at the .conf26 Acceleration Station

Navigating the show floor at .conf26 isn't just about keynotes and technical breakout sessions; it's also ...

Join the Final Session of the Data Management & Federation Bootcamp Series

Over the past three sessions of the Data Management & Federation Bootcamp Series, we've explored how to build ...

From Data to Insight: Announcing the Winners of the Splunk Dashboard Contest

Hi Splunkers, First off, thank you to everyone who participated in our very first From Data to Insight: The ...