![phraseexpress macro multiple times in phrase phraseexpress macro multiple times in phrase](https://24hitech.ru/wp-content/uploads/2020/09/b935990a6f56f601126d6923e41ca3ab.jpg)
If your search macro takes arguments, define those arguments when you insert the macro into the search string. If it does, you need to put a pipe character before the search macro.įor example, if you know the search macro mygeneratingmacro starts with the tstats command, you would insert it into your search string as follows: When you use a search macro in a search string, consider whether the macro expands to an SPL string that begins with a Generating command like from, search, metadata, inputlookup, pivot, and tstats. Search macros that contain generating commands You can also click Open in Search to run the expanded search string in a new window. You can copy parts of the expanded search string. If syntax highlighting or line numbering are enabled, those features also appear in the preview. The shortcut opens a preview that displays the expanded search string, including all nested search macros and saved searches. "foo`bar`baz" Preview search macros in search stringsĬheck the contents of your search macro from the Search bar in the Search page using the following keyboard shortcut: In the following example, the search macro bar is not expanded. Macros inside of quoted values are not expanded. For example, if you have a search macro named mymacro it looks like the following when referenced in a search: You can reference a search macro within other search macros using this same syntax. On most English-language keyboards, this character is located on the same key as the tilde (~). When you put a search macro in a search string, place a back tick character ( ` ) before and after the macro name. You can also specify whether the macro field takes any arguments. Search macros can be any part of a search, such as an eval statement or search term and do not need to be a complete command. Search macros are reusable chunks of Search Processing Language (SPL) that you can insert into other searches.