Hello experts, I am trying to create a custom macro, from that it will returns a result depends on the argument I pass to it, like this: | makeresults | eval param=1 | eval result=case(param == 1, "one", param == 2, "two", param == 3, "three", true(), "Invalid number") | table result The above searching query works well if I copy whole query and paste to the search bar | makeresults | eval param=$param$ | eval result=case(param == 1, "one", param == 2, "two", param == 3, "three", true(), "invalid input") | table result But when I used as a macro `getNumber(param=1)` I got an error Error in 'makeresults' command: This command must be the first command of a search. How can I solve this issue? Basically this macro will be used in another macro.
... View more