Splunk Search

Use field result from one search to perform another search?

dreamwork801
Path Finder

So I've searched the Splunk answers over and over, and read up on subsearches, but I must not be getting something quite right.

So I've got a subsearch (with the assumption that they are performed first) to search all events for a particular context Id, 123456, and then grabs the PaymentId from that event, and performs the outside search for events with the already found PaymentId, and then can get the fields from that event in a table, as shown below. What am I missing?

Data.Response.Payments{}.PaymentId = Data.Request.Payments{}.PaymentId [search ContextId = fcdc6c40-4ebe-4d0f-9481-ebb1701a6aae Pipeline = "RR" | fields + Data.Request.Payments{}.PaymentId] | table Data.Response.TotalPayablesCount
Tags (1)

martin_mueller
SplunkTrust
SplunkTrust

I believe the first part isn't necessary. Try running this:

[search ContextId = "fcdc6c40-4ebe-4d0f-9481-ebb1701a6aae" Pipeline = "RR" | fields Data.Request.Payments{}.PaymentId] | table Data.Response.TotalPayablesCount
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...