Dashboards & Visualizations

How to addterm to search using two form fields

hiddenkirby
Contributor

So i have a static select of values.. and an ExtendedFieldSearch text form field...

i would like to "addterm" to a hidden search.

my search string would be "index=myindex thestaticselectedvalue=theformfieldentry"

I am using the following but can't seem to get the form field's entry into the value (keeps passing null)

<module name"ConvertToIntention">
  <param name="intention">
   <param name="name">addterm</param>
   <param name="arg">
     <param name="$staticselectedvalue$">$theformfieldentry$</param>
   </param>
  </param>
 <module name="HiddenSearch>
 ... 

I always get "index=myindex staticselectedvalue=null"

halp!

TIA, Kirby

0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

ExtendedFieldSearch does not create a "setting" (which is what is "converted" from when you use "ConvertToIntention". Instead, it creates an intention directly. You would need to define the intention in the ExtendedFieldSearch. The problem you'll have is if you're trying to "re-use" the intention, e.g. in clickthrus after it was "consumed" by a search, you won't have a "setting" to re-create the intention from. If this is the case, you'd have to use "TextSetting" instead, though this is different and missing functions that ExtendedFieldSearch provides.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

ExtendedFieldSearch does not create a "setting" (which is what is "converted" from when you use "ConvertToIntention". Instead, it creates an intention directly. You would need to define the intention in the ExtendedFieldSearch. The problem you'll have is if you're trying to "re-use" the intention, e.g. in clickthrus after it was "consumed" by a search, you won't have a "setting" to re-create the intention from. If this is the case, you'd have to use "TextSetting" instead, though this is different and missing functions that ExtendedFieldSearch provides.

hiddenkirby
Contributor

this is helpful. i removed the "addterm" piece of code all together and added $staticselectvalue$=$formfieldvalue$ to my search string ... and it seems to only be passing default.. no matter what i type in. either way this is helpful and thank you.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...