Add parameters to macros

  1. On the Navigation toolbar, select Layout Designer .
  2. In the Layout Designer pane, in the Projects section, select a macro.
  3. Click and choose Properties.
  4. In the dialog box, on the Parameters tab, select one of the following:
    • Add Parameter
    • Add Local Variable

    The Parameter Properties dialog box is displayed.

  5. For Parameter Type, choose one of the following:
    • User Enter Value
    • User Select From Query-based List
    • User Select From Fixed List
    • Local Variable
  6. For Name, type a name for the parameter.
    • Parameter names must begin with an "@" symbol.
    • Parameter names cannot include spaces or special characters.
  7. For Prompt, type the text that you want to display to the user running the macro.
    • The prompt isn't specified for local variables.
    • You can specify another parameter name for the prompt.
  8. For Data Type, choose one of the following:
    • String
    • Integer
    • Float
    • Date
    • Boolean
  9.  For Initial Value, do one of the following to specify a default:
    • For the string, integer, or float data types, type a value.
    • For the date data type, select , and specify a date.
      To allow editing of date values, select the Include Time Value When Editing Dates check box.
    • For the boolean data type, select or clear the Initial Value check box.
  10. If you want to allow users to not provide a value, select the Allow Nulls check box.
  11. If your users must choose a value from a query-based list, specify the query:
    1. On the Query tab, choose a connection.
    2. For Value, select , and then construct the query.
    3. For Description, select , and then construct the query.
    4. If you want to specify conditions for the list, in the Conditions section, select Add Statement, and then construct the query.
    5. If you want to sort the list, in the Sort By section, select Add Statement, and then construct the query.
    6. If you want to limit the number of list items, select the Only The First __ Records check box, and then type a number.
  12. If your users must choose a value from a fixed list, create the list:
    1. On the List tab, select Add Row.

      An empty row is added to the Items section.

    2. In the Values column, select the row to activate the text field, and type a value.
    3. In the Description column, select the row to activate the text field, and type a description.
    4. Add more rows as needed.
  13. Click OK to close the Parameter Properties dialog box.

    In the dialog box, a box is displayed for each parameter.

    A visual identifier indicates the parameter and data type.
  14. Click OK to close the dialog box.
  15. Click Save.

Last modified: Friday May 12, 2023

Is this useful?