Knowledge Management

Can you use the same macro with additional arguments for another dashboard?

Shan
Builder

Hi All,

I have a macro with three Arguments.
I need to us the same macro in another dashboard, but there, i need to include one more dropdown filter condition or Argument to that macro. Is it possible to use the same macro with additional Arguments. But i don't want to disturb the macro base. In saved macro, macro should have 3 Arguments, But for that single dashboard it need to run with 4 arguments is it possible.

Thanks in Advance 🙂 ..

0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

Hi @shankarananth. Did the answer below solve your question? If yes, please click “Accept” directly below the answer to resolve the post. If not, please comment with more information if you are still having issues.

0 Karma

Richfez
SplunkTrust
SplunkTrust

Sure!

Make a copy of that macro, add an argument to it. When you call mymacro(p1, p2, p3) it'll use the one with three parameters. When you call mymacro(p1, p2, p3, p4) it'll use the one with 4 macros.

Happy Splunking!
Rich

skoelpin
SplunkTrust
SplunkTrust

This right here. No need to complicate the process by trying to reuse a macro and adding arguments.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...