Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Identify the form and the variable to be accessed through the macro editor.
  • Access the variable value using the '$' prefix in any other macro on the same page. See Field types to learn more about the supported field types.

...

First, let's populate two select list boxes using the Dynamic Select and Dynamic Multi Select field type types in a Run a user form and parameters macro. To do so, the relevant profile and SQL query must be provided. See Field types for more information.

Image RemovedImage Added

In the image:

  • A Run a user form and parameters macro has defined two select lists with IDs DYNSEL01 and DYNMULSEL01. Both lists are dynamically populated using an SQL query.
  • Two Run variable macros are defined. One to access the DYNSEL01 value and the second to access the DYNMULSEL01 value.
  • Note that both Run variable macros access the same form ID, DocTestForm01, same as specified in the Run a user form and parameters macro.

The Result section shows how the variable values are displayed on the page.

...

In the previous section, a Run a user form and parameters macro is defined with two dynamic select lists and now, the list selection is to be used in a Groovy macro that's available on the same page. 

Image RemovedImage Added

In this image:

  • A Groovy macro contains a two Run variable macro macros defined to access the form with DocTestForm01 ID, same as that of the Run a user form and parameters macro defined in the previous example.
  • Variable F12 stores F11 stores the value of DYNSEL01 in form ID DocTestForm01. For and variable F12 stores the value of DYNMULSEL01 from the same form. 

For this example,

...

 these values are simply displayed but

...

these can be processed further as required.

...

 The Result section shows how the variable value is displayed on the page.

...

Here, the image shows how the selected options of the lists can be accessed and displayed. As shown in the images of the previous sections, the numbered positions illustrate exactly how the variable values are displayed on the page.

Image RemovedImage Added

In this image:

  • Rochester is selected in DYNSEL01 and 'Chicago' in DYNMULSEL01 and the form is run.
  • From the first section:
    • The Run variable macros returned the selected options in the lists.
    • The text below the Run variable macros shows how using the '$' sign allows the variable values to be accessed.
  • From the second section:The selection The selections made in the first and second select list with ID as DYNSEL01 is shown lists are shown using the Groovy script.

Additional references