Dashboards & Visualizations

Will previously listed links will be unselected when selecting new ones in a dashboard with three different inputs link list each with different options?

lufermalgo
Path Finder

Hello community, please can you give me some help?

I have in my dashboard three different inputs link list each with different options, my question is:

It is possible to do that when selecting any of the options that I have, the previously selected option will be deactivated, that is, regardless of the fact that there are three different link list inputs, it is always a single selected option.

Ex: If I click on the latency option that deactivates the rest.

How can I do this?

alt text

0 Karma
1 Solution

@lufermalgo, you can use the <change>Event Handlers for un-setting the tokens using <unset> option in SimpleXML.

Following run anywhere example
1. un-sets Link List 1 and Link List 2 when Link List 3 is clicked.
2. un-sets Link List 3 when any option in Link List 1 is clicked.
3. un-sets Link List 3 when any option in Link List 2 is clicked.

<form>
  <label>Unset Tokens Link List</label>
  <fieldset submitButton="false">
  </fieldset>
  <row>
    <panel>
      <input type="link" token="tokLink1">
        <label>Link 1</label>
        <choice value="link1option1">Link 1 Option 1</choice>
        <choice value="link1option2">Link 1 Option 2</choice>
        <choice value="linkoption3">Link 1 Option 3</choice>
        <change>
          <unset token="tokLink3"></unset>
          <unset token="form.tokLink3"></unset>          
        </change>
      </input>
      <input type="link" token="tokLink2">
        <label>Link 2</label>
        <choice value="link2option1">Link 2 Option 1</choice>
        <choice value="link2option2">Link 2 Option 2</choice>
        <change>
          <unset token="tokLink3"></unset>
          <unset token="form.tokLink3"></unset>          
        </change>
      </input>
      <input type="link" token="tokLink3">
        <label>Link 3</label>
        <choice value="link3option1">Link 3 Option 1</choice>
        <change>
          <unset token="tokLink1"></unset>
          <unset token="form.tokLink1"></unset>
          <unset token="tokLink2"></unset>
          <unset token="form.tokLink2"></unset>
        </change>
      </input>      
    </panel>
  </row>
</form>

Please try out and confirm.

If your requirement is different then please add more details. Also add your Simple XML code snippet for Link Lists for us to assist you better.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

@lufermalgo, you can use the <change>Event Handlers for un-setting the tokens using <unset> option in SimpleXML.

Following run anywhere example
1. un-sets Link List 1 and Link List 2 when Link List 3 is clicked.
2. un-sets Link List 3 when any option in Link List 1 is clicked.
3. un-sets Link List 3 when any option in Link List 2 is clicked.

<form>
  <label>Unset Tokens Link List</label>
  <fieldset submitButton="false">
  </fieldset>
  <row>
    <panel>
      <input type="link" token="tokLink1">
        <label>Link 1</label>
        <choice value="link1option1">Link 1 Option 1</choice>
        <choice value="link1option2">Link 1 Option 2</choice>
        <choice value="linkoption3">Link 1 Option 3</choice>
        <change>
          <unset token="tokLink3"></unset>
          <unset token="form.tokLink3"></unset>          
        </change>
      </input>
      <input type="link" token="tokLink2">
        <label>Link 2</label>
        <choice value="link2option1">Link 2 Option 1</choice>
        <choice value="link2option2">Link 2 Option 2</choice>
        <change>
          <unset token="tokLink3"></unset>
          <unset token="form.tokLink3"></unset>          
        </change>
      </input>
      <input type="link" token="tokLink3">
        <label>Link 3</label>
        <choice value="link3option1">Link 3 Option 1</choice>
        <change>
          <unset token="tokLink1"></unset>
          <unset token="form.tokLink1"></unset>
          <unset token="tokLink2"></unset>
          <unset token="form.tokLink2"></unset>
        </change>
      </input>      
    </panel>
  </row>
</form>

Please try out and confirm.

If your requirement is different then please add more details. Also add your Simple XML code snippet for Link Lists for us to assist you better.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

lufermalgo
Path Finder

@niketnilay, it's pure magic.

I've already tried it that way, just do not use " </ unset>"

It works perfect, Thank you very much.

Glad you found it working... Meanwhile I got tempted to share this 🙂

alt text

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...