Splunk Search

How to conditionally add a search field?

mamerige
Engager

I'd like to conditionally add a parameter to my Splunk query based on the version number of my application.

I have an "uploadType" input that I want to use, but only for events where the app version is over a certain number because the old versions do not contains this field.

Something like:

if appVersion >= 10.0
then include uploadType=$uploadType$,
otherwise don't filter this field.

Is this possible?

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...