Dashboards & Visualizations

How to use a $ in a form search?

andrewkenth
Communicator

I have a search that uses filed!="*$", however when I use this in a form the form will not work. Is there a way to escape the $ so it is not interpreted as a form field?

Tags (2)
1 Solution

aelliott
Motivator

I think you can escape it with another dollar sign so $$

View solution in original post

aelliott
Motivator

I think you can escape it with another dollar sign so $$

kkrishnan_splun
Splunk Employee
Splunk Employee

Simply beautiful

0 Karma

nick405060
Motivator

Thank you!!

I was trying to write XML and include a search that looked like:

eval something=$n$ | eval filename=(code) ........ | map maxsearches=28 search="| inputcsv $filename"

... and it was not working for the life of me. Turning $filename into $$filename$$ did the trick.

eval something=$n$ | eval filename=(code) ........ | map maxsearches=28 search="| inputcsv $$filename$$"

0 Karma

andrewkenth
Communicator

Simple, elegant and awesome! Thanks!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...