Creating a macro with arguments

Let's collapse the entire search into a macro that takes two arguments; the user and a value for maxpause:

Be sure to remove newlines from your search definition. Macros do not appear to work with embedded newlines.

Walking through our fields, we have the following:

After clicking on Save, our macro is now available for use. We can use it like this:

webtransactions_user_maxpause(mary,5m) 

or:

`webtransactions_user_maxpause("mary","5m")` 
We will use this feature in conjunction with a workflow action later in this chapter. See the Building a workflow action to show field context section later in this chapter.