AX1633

GetFileGroupVariableEnablement function

Returns whether a picklist variable is enabled for a specified value in the picklist enablement column (True/False).

Syntax

GetFileGroupVariableEnablement("VariableName", EnablementValue, FileGroupID)

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.

FileGroupID

Optional. The database ID of the file group.

  • If you are using the function within a file that belongs to a file group (template, driver, etc.), then you can omit the ID and the current file group is assumed.
  • If you are using the function outside of a file group (such as in a report file), then you must specify a file group ID. The function GetFileGroupID can be used to return the file group ID as necessary.

All non-numeric entries must be placed in double quotation marks, unless you are using cell references to reference the text held in another cell.

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.

  • When using GetFileGroupVariableEnablement within a file that belongs to a file group, you may see a small performance improvement if you include the file group ID in the function rather than omitting it to assume the current file group. In this case you should have a single designated cell that uses the GetFileGroupID function to return the ID for the current file group, and then reference that cell to get the ID.

  • GetFileGroupVariableEnablement is a non-volatile function.

Examples

=GetFileGroupVariableEnablement("Category", 1)

This example returns True if the Category variable is enabled for value 1, and False if it is not. The function is used within a file that belongs to a file group, so the file group ID is omitted.

=GetFileGroupVariableEnablement("Category", Variables!$F$27, Variables!$F$10)

This example is the same as the previous example, except that the enablement value and the file group ID are being read from another sheet using a cell reference. In most cases these values will be queried into the file using a GetData data lookup or function.