AX1627

GetFileGroupVariableProperty function

Returns information about file group variable properties, given the name of a table variable or a picklist variable.

NOTE: This function does not return the value of a variable. For that, use GetFileGroupVariable.

Syntax

GetFileGroupVariableProperty("VariableName", "CodeName", FileGroupID)

Parameter Description

VariableName

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

CodeName

Use one of the following codes to specify the property you want to return for the variable:

  • ColumnName: Returns the name of the column on the plan code table that is associated with the variable. Returns blank if no column is associated with the variable. Applies to picklist variables.

  • EnabledValues: Returns a comma-separated list of enabled values for the variable. These values are selected for the variable based on the designated picklist enablement column in the plan code table. Values are returned using the integer code from the associated picklist, not the text value. Applies to picklist variables.

    Returns blank if the variable is enabled for all values, and returns the reserved text Ax_Disabled if the variable is disabled for all values.

  • IsReadOnly: Returns whether the variable is flagged as read-only (True/False). Applies to table variables.

  • IsRequired: Returns the variable is flagged as required (True/False). Applies to picklist variables.

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

  • When using this function 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.

  • All variable properties returned by this function are defined for the variable in the Edit File Group dialog, on the Variables tab.

  • GetFileGroupVariableProperty is a non-volatile function.

Examples

=GetFileGroupVariableProperty("Category", "ColumnName")

This example returns the name of the column that is associated with the picklist variable Category. For example: CPREQ2019.Category. The function is used within a file that belongs to a file group, so the file group ID is omitted.

=GetFileGroupVariableProperty("Category", "EnabledValues", Variables!$F$20)

This example returns the list of enabled values associated with the picklist variable Category. For example: 1,4. In this example the file group ID is being specified by pointing to a designated cell on the Variables sheet that contains a GetFileGroupID function.

=GetFileGroupVariableProperty("GLData", "IsReadOnly")

This example returns whether the table variable GLData is flagged as read-only. For example: True. This means that the file group does not save data to the table that GLData resolves to.

=GetFileGroupVariableProperty("Category", "IsRequired")

This example returns whether the picklist variable Category is flagged as required. For example: True. You could use this information to require the user to select a category for the plan file, by enabling custom save validation for a save-to-database process.