topic Re: use where command with a variable that can we get from input text field in Getting Data In
https://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112541#M23586
<P>yes, I tried it, but the query doesn't return any result. this is my query :</P>
<P>|dbquery "db_sales" "SELECT model, year, product, FROM cars c , product p where v.product=p.idproduct"<BR /><BR />
| fields model, year, pays, product| where product="$product$"<BR />
any ideas</P>Fri, 10 Jul 2015 10:21:09 GMTotman012015-07-10T10:21:09Zuse where command with a variable that can we get from input text field
https://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112539#M23584
<P>hi, <BR />
how can we use where command with a variable that can we get from input text field</P>
<P><searchTemplate><BR />
| where product =$product$ </P>
<PRE><CODE> <input type="text" token="product ">
</CODE></PRE>Fri, 10 Jul 2015 09:11:55 GMThttps://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112539#M23584otman012015-07-10T09:11:55ZRe: use where command with a variable that can we get from input text field
https://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112540#M23585
<P>You are using it right but you can take a look at this <A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Viz/tokens">http://docs.splunk.com/Documentation/Splunk/6.2.3/Viz/tokens</A></P>
<P>You probably need to change | where product =$product$ -> | where product ="$product$"</P>
<P>And the token field in input should not contain the space after product, token="product " -> token="product"</P>
<P>Try that and report, glad i could help</P>Fri, 10 Jul 2015 10:10:34 GMThttps://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112540#M23585joao_amorim2015-07-10T10:10:34ZRe: use where command with a variable that can we get from input text field
https://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112541#M23586
<P>yes, I tried it, but the query doesn't return any result. this is my query :</P>
<P>|dbquery "db_sales" "SELECT model, year, product, FROM cars c , product p where v.product=p.idproduct"<BR /><BR />
| fields model, year, pays, product| where product="$product$"<BR />
any ideas</P>Fri, 10 Jul 2015 10:21:09 GMThttps://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112541#M23586otman012015-07-10T10:21:09ZRe: use where command with a variable that can we get from input text field
https://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112542#M23587
<P>Just a guess, but try <CODE>search</CODE> instead of <CODE>where</CODE>.</P>Fri, 10 Jul 2015 11:37:57 GMThttps://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112542#M23587richgalloway2015-07-10T11:37:57ZRe: use where command with a variable that can we get from input text field
https://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112543#M23588
<P>thank you for your respons it works <span class="lia-unicode-emoji" title=":slightly_smiling_face:">ðŸ™‚</span></P>Fri, 10 Jul 2015 12:47:49 GMThttps://community.splunk.com/t5/Getting-Data-In/use-where-command-with-a-variable-that-can-we-get-from-input/m-p/112543#M23588otman012015-07-10T12:47:49Z