GetEnumsByDbField

You can use this function to retrieve enumeration values and labels based on a business object and database field.

Purpose

The GetEnumsByDbField function returns enumeration values and labels using the specified symbol and database field.

Syntax

GetEnumsByDbField("FORMULA", "USAGE")
GetEnumsByDbField("FORMULA", "USAGE", "FR-FR")

Return Value

The function returns a dictionary of enum values and their corresponding labels.

Arguments

Part Description
symbol The business object (for example, FORMULA).
dbFieldName The database field name.
language Optional. Specifies the language used to retrieve the corresponding enum labels. Default is "EN-US".

Description

You can use the GetEnumsByDbField to retrieve enumeration values and labels associated with a database field. This function supports language-specific labels.

Examples

Dictionary<string, string> enumsEN = GetEnumsByDbField("FORMULA", "USAGE");
Dictionary<string, string> enumsFR = GetEnumsByDbField("FORMULA", "USAGE",   
"FR-FR");
Note: 
  • The GetEnumsByDbField returns dictionary of enum values and enum labels for the provided DB_FIELD_NAME by checking the validation record ENUM_CODE, ENUM_QUERY based on the ENUM_IND.
  • If a language is not provided or is invalid, the default language ("EN-US") is used.
  • This function returns an empty dictionary when no matching values are found or when invalid inputs are provided.