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!

Where Innovation Takes Flight: The Splunk4Aviation Flight Sim Lands at .conf26

If you hear someone at .conf26 shouting "gear down, GEAR DOWN" across the show floor, you have found us.  The ...

Turn Cisco Telemetry Into Action with Cisco Data Fabric, powered by the Splunk ...

The surge in machine data is already hitting enterprise budgets, and the agentic era will only intensify it. ...

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...