Dashboards & Visualizations

Dashboard with a partial search bar

lsbarreto96
Engager

Hello All,

I am trying  to create a dashboard with an interactive input search bar. The field that is searchable has always 16 digits but I want the users to only search with the 6 first digits, for example they will inform a number 123456, and whatever occurrence with the "123456" will show in the report.

I tried to use the sufix field, putting an "*" but it failed, I also tried to include the "*" in the search with the token but it also failed.

Is there any way to do it?

 

Thank you in a dvancne!

Labels (2)
0 Karma
1 Solution

venkatasri
SplunkTrust
SplunkTrust

Hi @lsbarreto96 

I assume you are using Splunk classic simple xml style dashboard, I have tested following and it works with suffix. Can you compare with source code if this works?

 

<form>
  <label>Test</label>
  <fieldset submitButton="false">
    <input type="text" token="token_name">
      <label>Field Name</label>
      <suffix>*</suffix>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>index=_internal sourcetype=$token_name$</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>

 

---

An upvote would be appreciated and Accept solution if this reply helps!

View solution in original post

venkatasri
SplunkTrust
SplunkTrust

Hi @lsbarreto96 

I assume you are using Splunk classic simple xml style dashboard, I have tested following and it works with suffix. Can you compare with source code if this works?

 

<form>
  <label>Test</label>
  <fieldset submitButton="false">
    <input type="text" token="token_name">
      <label>Field Name</label>
      <suffix>*</suffix>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>index=_internal sourcetype=$token_name$</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>

 

---

An upvote would be appreciated and Accept solution if this reply helps!

lsbarreto96
Engager

Thank you very  much! It has worked now! 

0 Karma

venkatasri
SplunkTrust
SplunkTrust

@lsbarreto96 glad it helped. It would be great if you could accept the solution it helps others.

Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...