Dashboards & Visualizations

Dropdown value using inputlookup

rsathish47
Contributor

Hi All,

Am not able to populate value for dropdown using inputlookup.. Nothing was listing the Dropdown. Please let me if am doing anything wrong. Thanks in advance

<fieldset>
  <input type="dropdown" token="country_name">
  <label>Select a user</label>
  <choice value="*">Any</choice>
    <populatingSearch fieldForValue="country_name" fieldForLabel="country_name">
      <![CDATA[ | inputlookup country_name | fields country_name ]]>
    </populatingSearch>
  </input>
</fieldset>

Thanks
Sathish R

Tags (2)
0 Karma

somesoni2
SplunkTrust
SplunkTrust

In this xml (pasted above), name of the field returned by "|inputlookup" and used in 'fieldforvalue' and 'fieldforlabel' is different. You need to add "|rename Business_unit as BUName" in your search for dropdown.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Based on the full form XML, your fields Business_unit doesn't match up with fieldforvalue="BUName".

rsathish47
Contributor

Thanks Martin.. i changed it and works fine 🙂

0 Karma

rsathish47
Contributor

Simple XML:

index=msexchange source=Powershell sourcetype="MSExchange:2010:DistributionGroup-Members" DistributionGroup=$BUName$ | dedup Alias| table DistributionGroup Name Alias

Any | inputlookup Orch_Retension_Audit | fields Business_unit
Results50

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

That should work then, copying your fieldset into a SimpleXML form over here works as soon as I added a corresponding lookup by that name.

0 Karma

rsathish47
Contributor

yes am getting data in regular search

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

In principle that's the correct way to go. Does the populating search yield results in the regular search interface for that app?

0 Karma

rsathish47
Contributor

Simple XML:

Any | inputlookup country_name | fields country_name
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...