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

niketn
Legend

@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

niketn
Legend

@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.

niketn
Legend

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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...