<?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: How to concatenate a string with a variable? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626985#M217900</link>
    <description>&lt;P&gt;I showed you how to do that this morning.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-append-the-result-of-a-search-to-values-of-a-multivalued/m-p/626926#M217875" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-append-the-result-of-a-search-to-values-of-a-multivalued/m-p/626926#M217875&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2023 22:04:48 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-01-12T22:04:48Z</dc:date>
    <item>
      <title>How to concatenate a string with a variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626984#M217899</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to run this search but i have to concatenate the string with a variable and it doesn't work&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;| rest splunk_server=local /servicesNS/-/-/saved/searches&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; | where match(search,"outputlookup\s.$lookup$")&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 21:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626984#M217899</guid>
      <dc:creator>buttsurfer</dc:creator>
      <dc:date>2023-01-12T21:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate a string with a variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626985#M217900</link>
      <description>&lt;P&gt;I showed you how to do that this morning.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-append-the-result-of-a-search-to-values-of-a-multivalued/m-p/626926#M217875" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-append-the-result-of-a-search-to-values-of-a-multivalued/m-p/626926#M217875&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 22:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626985#M217900</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-12T22:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate a string with a variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626987#M217902</link>
      <description>&lt;P&gt;The $lookup$ variable is a token from the dashboard drilldown&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 22:37:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626987#M217902</guid>
      <dc:creator>buttsurfer</dc:creator>
      <dc:date>2023-01-12T22:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate a string with a variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626990#M217903</link>
      <description>&lt;P&gt;Based on the comments in your original post - (try not to create multiple posts with different info, it makes it hard for people to help) - I understand you have a token that has multiple values.&lt;/P&gt;&lt;P&gt;If that $lookup$ token is created through a &amp;lt;set token="lookup"&amp;gt; statement in the drilldown and the original field is MV, then the token will concatenate those values and look like&amp;nbsp;&lt;/P&gt;&lt;P&gt;a,b,c,d&lt;/P&gt;&lt;P&gt;so to do the match you would have to to something like (untested)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest splunk_server=local /servicesNS/-/-/saved/searches 
| eval lookups="(".replace($lookup$, ",", "\|").")"
| where match(search,"outputlookup\s".lookups) &lt;/LI-CODE&gt;&lt;P&gt;which effectively is turning a,b,c,d into (a|b|c|d) and then the match will be doing&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where match(search,"outputlookup\s(a|b|c|d)") &lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 12 Jan 2023 23:13:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/626990#M217903</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-01-12T23:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate a string with a variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/627035#M217920</link>
      <description>&lt;P&gt;This doesn't seem to work and the field is not a MV&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 08:09:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/627035#M217920</guid>
      <dc:creator>buttsurfer</dc:creator>
      <dc:date>2023-01-13T08:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate a string with a variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/627041#M217922</link>
      <description>&lt;P&gt;Pro tip (to get help from volunteers): Describe/illustrate your data (anonymize as needed but explain any characteristics others need to know) and desired output; describe the logic connecting your data and desired results (short, simple sample code/pseudo code is fine); if you have tried sample code, illustrate output and explain why it differs from desired results.&lt;/P&gt;&lt;P&gt;From the OP to this, there is only one piece of sample code and an explanation that the token in the sample is not itself multivalued. &amp;nbsp;Unless you provide the rest of information,&amp;nbsp;"it doesn't work" conveys absolutely no information. &amp;nbsp;In fact, avoid this phrase like a plague even at the best of times.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 08:49:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concatenate-a-string-with-a-variable/m-p/627041#M217922</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-01-13T08:49:24Z</dc:date>
    </item>
  </channel>
</rss>

