Knowledge Management

While calling macro with Argument, "Error in 'SearchParser'" Error is thrown

jshanaiah
Explorer

I have Configured Macro with arguments,

While calling the macroname with arguments ,

It is throwing error

Error in 'SearchParser': Missing a search command before ' '.

Please let me know why I am seeing this..

Thanks

Tags (1)
0 Karma

DaveO35
Explorer

I see this is an older question, hopefully you found a solution to this. I was just working though a similar issue when I found this post. I found the issue to be a hard return at the end of my macro. I was cutting and pasting from an external editor and had grabbed a hard return on the end by accident. My error was something along the lines of 'last argument of appendcols must be a subsearch'. After I removed that hard return, it worked.

jshanaiah
Explorer

Hi,

Macro Search string used is as follows,

index=trans tranTypeId = 1 AND tranDestinationId=1 AND promoCode=$promocode$| eval series="Total Registrations Atempts" | chart count by series

registrationPromo(1) is the name of the macro..

0 Karma

rroberts
Splunk Employee
Splunk Employee

Can you post the macro search string and the name of the macro here please?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...