AX1177

GetFileGroupVariableEnablement data lookup

You can use GetFileGroupVariableEnablement in a DataLookup data source to return whether a picklist variable is enabled for a specified value in the picklist enablement column (True/False).

The GetFileGroupVariableEnablement data lookup supports similar query parameters as the GetFileGroupVariableEnablement function, and can be used as a substitute for this function to improve file performance. The data lookup is intended to be used in cases where the queried value is not expected to change during the current file session, and therefore the value only needs to be queried once (or only after specific events).

To create a GetFileGroupVariableEnablement data lookup, add a [GetFileGroupVariableEnablement] row to a DataLookup data source and add the appropriate parameter columns. For more information on creating the DataLookup data source, see Creating DataLookup data sources.

GetFileGroupVariableEnablement parameters

[GetFileGroupVariableEnablement] rows use the following parameter columns. Within the DataLookup control row, these parameter names must be placed in square brackets—for example, [VariableName]. The parameters can be placed in any order.

NOTE: If the entry for any parameter depends on a value returned by another data lookup row, then that row must be in a different data source and executed before this row is executed. For more information, see Dependent data lookups.

Parameter Description

VariableName

The name of the variable for which you want to return information.

EnablementValue

The enablement value to test. This is the integer code from the picklist that the picklist enablement column looks up to.

FileGroup

Optional. The ID or name of the file group.

  • If you are using the data lookup within a file that belongs to a file group (template, driver, etc.), then you can omit this parameter and the current file group is assumed.
  • If you are using the data lookup outside of a file group (such as in a report file), then you must specify either the file group ID or the file group name (the true name, not the display name if it is different). File group aliases can be used for the file group name.

Result

The Result column is where the return value for the row is placed when the data lookup is executed. You can reference this cell to use the return value in other areas of the file.

This column must be present in order for the data lookup to be valid.

IsError

Optional. Indicates whether the return value for the data lookup was an error.

  • If TRUE, the return value is an error. This may be an Axiom #ERR code, a specific error message, or a custom error message defined in the data lookup (such as the GetData invalid query message).
  • If FALSE, the query executed successfully.

The IsError column can be helpful if you need to set up formulas with error trapping. Instead of using the ISERROR Excel function, you can use a construction such as:

=IF(Info!$M$10=True, "", Info!$L$10)

Where the IsError column is in M10 and the Result column is in L10. If the data lookup returns an error, this function returns blank instead of displaying the error.

Remarks

  • The picklist enablement column and the specified enablement values for each picklist variable are configured in the Edit File Group dialog, on the Variables tab, Picklist Variables sub-tab. For more information, see Using picklist variables for file groups.

  • GetFileGroupVariableEnablement returns True if the picklist variable is enabled for all values, or if the specified value is selected for the variable. It returns False if the picklist variable is disabled for all values, or if the specified value is not selected for the variable.

  • If the specified variable is not a picklist variable, then GetFileGroupVariableEnablement always returns True. Enablement values do not apply to other variable types.

  • If no picklist enablement column has been specified for the file group, then GetFileGroupVariableEnablement always returns True.

  • GetFileGroupVariableEnablement does not evaluate whether the specified enablement value actually exists in the picklist that the picklist enablement column looks up to. An invalid enablement value will not cause GetFileGroupVariableEnablement to return an error.

Example

The following screenshot of a DataLookup data source shows several GetFileGroupVariableEnablement examples:

For more examples of GetFileGroupVariableEnablement use, see GetFileGroupVariableEnablement function. The same examples work for both approaches. To use a function example in a DataLookup data source, you would place the applicable function parameters in the corresponding parameter columns.