<?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 token argument to macro argument in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320369#M2767</link>
    <description>&lt;P&gt;@surekhasplunk ,&lt;/P&gt;

&lt;P&gt;In macro, you just need to pass the token as &lt;CODE&gt;mymacro($field1$)&lt;/CODE&gt; where field1 is your token. &lt;/P&gt;

&lt;P&gt;Make sure that the argument list and definition of macro matches in terms of number of arguments and variable name&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.0/Knowledge/Usesearchmacros"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.0/Knowledge/Usesearchmacros&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2017 04:01:00 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2017-12-06T04:01:00Z</dc:date>
    <item>
      <title>dropdown token argument to macro argument</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320367#M2765</link>
      <description>&lt;P&gt;Am using a macro with 1 argument&lt;BR /&gt;
and while calling it to update my table with values am passing query as &lt;CODE&gt;mymacro(arg1=*)&lt;/CODE&gt; and it works well. &lt;/P&gt;

&lt;P&gt;Now my requirement is arg1 value is coming from dropdown selected value. &lt;BR /&gt;
So if i have set token as field1 for the dropdown then how to use that as arg1 for macro. &lt;/P&gt;

&lt;P&gt;i tried using &lt;CODE&gt;mymacro(arg1=$field1$)&lt;/CODE&gt; but it isn't working. &lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 14:09:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320367#M2765</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2017-12-05T14:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: dropdown token argument to macro argument</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320368#M2766</link>
      <description>&lt;P&gt;@surekhasplunk, can you add dropdown code XML?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 14:15:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320368#M2766</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-05T14:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: dropdown token argument to macro argument</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320369#M2767</link>
      <description>&lt;P&gt;@surekhasplunk ,&lt;/P&gt;

&lt;P&gt;In macro, you just need to pass the token as &lt;CODE&gt;mymacro($field1$)&lt;/CODE&gt; where field1 is your token. &lt;/P&gt;

&lt;P&gt;Make sure that the argument list and definition of macro matches in terms of number of arguments and variable name&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.0/Knowledge/Usesearchmacros"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.0/Knowledge/Usesearchmacros&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 04:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320369#M2767</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2017-12-06T04:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: dropdown token argument to macro argument</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320370#M2768</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="field1" id="resized_input"&amp;gt;
  &amp;lt;label&amp;gt;Business Area&amp;lt;/label&amp;gt;
  &amp;lt;prefix&amp;gt;"&amp;lt;/prefix&amp;gt;
  &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;SubDivision 4&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;SubDivision 4&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;|inputlookup file.csv| dedup  "SubDivision 4" | table "SubDivision 4"&amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
  &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My field1 is a string and has got spaces in it. &lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 11:33:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/dropdown-token-argument-to-macro-argument/m-p/320370#M2768</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2017-12-06T11:33:43Z</dc:date>
    </item>
  </channel>
</rss>

