All Apps and Add-ons

Pulldown in a Table that has an embedded search based on row values

spencerbrett
Path Finder

I have several Sideview Utils modules embedded and attempting interactivity. I'm having issues accessing the value in my Pulldown that is embedded in a Table to fire off a search.

Basically, I have a table of results. In each row, there are several columns of data, a column with a Pulldown module with several static values, and then a button that is supposed to fire off a search that uses values from the table and the selected value in the Pulldown. Specifically, the CauseSelection parameter is not showing up in the search.

Below is the structure of the XML.


<module name="PostProcess" layoutPanel="panel_row2_col1" group="MCT">
<param name="search"> | eval earliest=strptime(pdt_start,"%b %e %H:%M") |eval latest=strptime(pdt_end,"%b %e %H:%M") |eval CS="PLACEHOLDER" |eval latestMissed=strptime(pdt_end,"%b %e %H:%M")+60 | table B_I, N, I, BO, W, D,earliest, latest, latestMissed,A,OTF,B_P, Cause, CS |sort -W,N </param>

<module name="ResultsValueSetter">
<param name="fields">Cause,B_I, W, N, BO, I,D </param>
<module name="Table">
<param name="hiddenFields">earliest,latest,latestMissed, B_I, BO, I, D</param>
<module name="Pulldown" group="row.fields.CS">
<param name="name">CauseSelection</param>
<param name="label"></param>
<param name="staticOptions">
<list>
<param name="value"></param>
<param name="label"></param>
</list>
<list>
<param name="value">Undetermined</param>
<param name="label">Undetermined</param>
</list>
<list>
<param name="value">Pro</param>
<param name="label">Pro</param>
</list>
<list>
<param name="value">I</param>
<param name="label">I</param>
</list>
</param>
<module name="Button">
<param name="allowSoftSubmit">False</param>
<param name="allowAutoSubmit">False</param>
<module name="Search">
<param name="search">| Some-Macro($B_I$,$CauseSelection$,$N$, $I$, $BO$, $W$, $D$)</param>
<module name="HTML">
<param name="loadingText">...</param>
<param name="html"> $results[0].Message$ </param>
</module>
</module>
</module>
</module>
</module>
</module>
</module>

spencerbrett
Path Finder

Here's what got it working:


eval Cause="PLACEHOLDER" | table B_Id, N, I, B, W, D,A,O_T_F,B_P, Cause, theCause| sort -W,N




B, I, D, theCause

Cause
$row.fields.theCause$

Cause






Undetermined
Undetermined


P
P


I
I


S
S


E
E



False
False
Save

| Store_Cause($row.fields.B_Id$,$Cause$,$row.fields.N$, $row.fields.I$, $row.fields.B$, $row.fields.W$, $row.fields.D$)

...


$results[0].Message$








sideview
SplunkTrust
SplunkTrust

Excellent. Minor comment - of the group="row.fields.Cause" attributes that you have, only the one on the ValueSetter is necessary - the others can be deleted. Table Embedding only needs the topmost layer of embedded modules to identify which column they're embedded into. All other group attributes (as well as all layoutPanel attributes obviously) will be ignored.

0 Karma

splunk7869
New Member

Hi could you kindly explain how to get this done.

0 Karma

sideview
SplunkTrust
SplunkTrust

I haven't heard from you but re-reading this question, I have a guess. If all these fields you're referring to in the postProcess search, are not all referenced explicitly in the underlying base search, then splunkd will optimize them away and thus those fields will be null. Then when the corresponding $foo$ token is null as plugged into the macro, the little embedded searches may be dying with no error. Send me an email or maybe post the XML for the entire view into pastebin?

0 Karma

sideview
SplunkTrust
SplunkTrust

Very strange. Send me an email at nick [at] sideviewapps.com . If you're game I'd like to hop on a webex for just 10minutes and take a look.

0 Karma

spencerbrett
Path Finder

There are no JS errors. I've tried it in both Chrome and Firefox. There is no CustomBehavior logic or any lower level JS patches on the page.

0 Karma

sideview
SplunkTrust
SplunkTrust

Hm. No there really hasn't been anything in 2.5 that should affect this area one way or another. Are there any JS errors in the error console? What browser are you using? Are you using any CustomBehavior logic or any lower level JS patches on the page?

0 Karma

spencerbrett
Path Finder

I have 2.4.10 installed. I will update, but are there any significant changes that would affect this between these versions?

0 Karma

sideview
SplunkTrust
SplunkTrust

Strange. I put your config into one of the existing testcase views for table embedding and it seems to work fine, in that the $CauseSelection$ argument does get put into the resulting search just fine. What version of Sideview Utils are you using? Are you using any of your own CustomBehavior logic on the page, or any custom JS patches of your own? Assuming you're on an older version could you update Sideview Utils to latest (2.5) to see if the problem goes away?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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