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!

Congratulations to the 2025-2026 SplunkTrust!

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

[Puzzles] Solve, Learn, Repeat: Nested loops in Event Conversion

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Your Guide to Splunk Digital Experience Monitoring

A flawless digital experience isn't just an advantage, it's key to customer loyalty and business success. But ...