Creating and Using Macros Mod 11 Flashcards
What macros useful for?
Useful when you frequently run searches or reports with similar search syntax
When is the time range selected when using a macro?
At search time
What are Macros?
Macros can be a full search string or a portion of a search that can be reused in multiple places
Macros allow you to define one or more arguments within the search segment and also:
- pass parameter values to macro at execution time
- macro uses values to resolve search string
How would you create a basic Macro?
- settings
- advanced search
- search macros
After opening search macros what do you need to do to finish?
- Click New Search Macro
- Select the destination app
- Enter a name
- Type the search string
- Save
What should you do before saving your macro?
Test your searhc string before saving your macro. You can check the contents fo your macro with keyboard shortcuts (command-shift-E on Mac OS or control-shift-E on Linux or Windows) from the search bar in the search page
How do you use a basic Macro?
- Type the macro name into the search bar
- Surround the macro name with the backtick (or grave accent) character (
macroname
) - Pipe to more commands, or precede with search string
What must you do when you add arguments to the macro?
Include the number of arguments in parentheses after the macro name
- montly_sale(3)
What is the format you must use in the search definition field of a macro?
$arg$ example:
- currency=$currency$
- symbol=$symbol$
- rate=$rate$
In the arguments field what should be entered?
The argument(s)
What should be provided at search time when using a macro?
Provide one or more variables of the macro at search time
What is the order that the arguments should be in?
Pass the arguments in the same order as you defined them
Why should you not create macros with leading pipes?
Someone may put a pipe in front of the macro when using it in the actual search string
Can you validate argument values in your macro?
Yes you can.