<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dropdown retains entries from old query result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644468#M223205</link>
    <description>&lt;P&gt;Do you know how I can set the dropdown to the first result in the query, like if the query returns a list of strings, how do I get the first element and set it to the form.token?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;unset token="form.project_name"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;set token="form.project_name"&amp;gt;$form.result blah blah$&amp;lt;/set&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;btw the unset method worked, my old results are gone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2023 12:24:38 GMT</pubDate>
    <dc:creator>jonvijay1993</dc:creator>
    <dc:date>2023-05-24T12:24:38Z</dc:date>
    <item>
      <title>Why does Dropdown retain entries from old query result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644431#M223199</link>
      <description>&lt;P&gt;I have a query for for my dropdown with tokens inserted here and there and whenever the values on those tokens change my query runs to populate the dropdown.&lt;/P&gt;
&lt;P&gt;But the problem is that sometimes the new values and old values are displayed together and I don't want that.&lt;/P&gt;
&lt;P&gt;And worse is, the old value remains selected sometimes. I have to manually select my new entry. I have SelectFirstValue to true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 14:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644431#M223199</guid>
      <dc:creator>jonvijay1993</dc:creator>
      <dc:date>2023-05-24T14:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown retains entries from old query result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644459#M223202</link>
      <description>&lt;P&gt;Try adding a done handler to the search that populates to dropdown which unsets the token.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 10:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644459#M223202</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-24T10:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown retains entries from old query result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644462#M223204</link>
      <description>&lt;P&gt;Ok I shall try this, thank you! I thought splunk was able to handle this by default, but solutions are also good!&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 11:29:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644462#M223204</guid>
      <dc:creator>jonvijay1993</dc:creator>
      <dc:date>2023-05-24T11:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown retains entries from old query result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644468#M223205</link>
      <description>&lt;P&gt;Do you know how I can set the dropdown to the first result in the query, like if the query returns a list of strings, how do I get the first element and set it to the form.token?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;unset token="form.project_name"&amp;gt;&amp;lt;/unset&amp;gt;
&amp;lt;set token="form.project_name"&amp;gt;$form.result blah blah$&amp;lt;/set&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;btw the unset method worked, my old results are gone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 12:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644468#M223205</guid>
      <dc:creator>jonvijay1993</dc:creator>
      <dc:date>2023-05-24T12:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown retains entries from old query result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644473#M223208</link>
      <description>&lt;P&gt;Since you are trying to set the value of the token, there is no need to also unset it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;eval token="form.project_name"&amp;gt;$results.label&amp;lt;/eval&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;or whatever the field you are using for the label is called&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 12:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Dropdown-retain-entries-from-old-query-result/m-p/644473#M223208</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-24T12:50:03Z</dc:date>
    </item>
  </channel>
</rss>

