Add a Lookup Trigger

This feature is available only in Enterprise Edition.

You can use scripted logic to enable or disable the VPM. Follow the steps below:

  1. If necessary, create a VPM as explained in Create a New VPM.

  2. Select the Lookup tab at the bottom.

    dataModel81

  3. Select the Trigger sub-tab.

    dataModel82

  4. Enter the desired trigger script in the text box at the bottom. The trigger script should use standard JavaScript syntax, and should return true to enable VMP or false to disable VPM.

    Example 1. Lookup trigger script
    if(user=='Annie') {
        false; // VPM not enabled
    }

    The following parameters are available for use in the script:

    Lookup Trigger Script Parameters
    user

    The current user name

    roles

    Array of roles associated with this user

    groups

    Array of groups associated with this user

    parameter

    Dashboard or Worksheet parameters

    tables

    List of tables in the query

    columns

    Array of columns included in the query

  5. Press the ‘Save’ button save to save the VPM.