Knowledge Management

How to write a validation expression for a macro?

rajgowd1
Communicator

Hi,

i have defined macro like services($searchterm$,$mng$,$fng$)

how can we write validation expression? if we don't mention $searchterm$ while searching, it displays with validation message.

1 Solution

sundareshr
Legend

Try this

Validation expression: isnotnull($searchterm$)
Validation error message: The search term value that you have provided is not valid. Enter a valid search term.

View solution in original post

0 Karma

sundareshr
Legend

Try this

Validation expression: isnotnull($searchterm$)
Validation error message: The search term value that you have provided is not valid. Enter a valid search term.
0 Karma

duartet
Path Finder

It's not working for me. Maybe something changed since 2016?

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...