- API
- Data types
- Category (enumeration)
- Getting started [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
- Manage types
- Global context and isolation
- Manage apps
- Batch actions with app items
- Manage external services
- Scripts in widgets
- Web components
- Access permissions
- Getting started with processes
- Getting started with signatures
- Getting started with file previews
- Getting started with the organizational chart
- Getting started with users and groups
-
Getting started with the
Table data type -
Getting started with the
Category data type - Dynamic event type calculation
- Typical use cases
-
API
- Object types
-
Data types
- AccountType
- DynamicFieldType
- EmailType
- OrganisationStructureItemType
- PhoneType
- ReplacementType
- ServiceStatus
- UserStatus
- WatermarkPages
- WatermarkPosition
- AccountFieldTyped
- AccountFieldVoid
- ApplicationField
- ApplicationTypeField
- ApplicationTypeFieldData
- Cell
- ClientEventField
- CookieOptions
- DatetimeFieldData
- DynamicBindingField
- DynamicBindingFields
- EnumField
- ErrorArgs
- ErrorObject
- FileField
- FloatFieldData
- GroupStatusField
- HttpResponse
- ImageField
- Language
- MailMessageAddress
- MailMessageAttachment
- MoneyFieldData
- Navigator
- Page
- ParseSpreadsheetOptions
- ParseSpreadsheetResponse
- RefItem
- RefItemField
- RefItemFieldData
- RefItemFilterClosure
- ReportField
- ReportRef
- Role
- RoleField
- Row
- ServiceStatusInfo
- StaticApplicationFieldData
- StatusField
- TAccount
- TApplicationType
- TClientEvent
- TDate
- TDatetime
- TDuration
- TEmail
- TEnum
- TFullName
- TMoney
- TPhone
- TReport
- TStatus
- TTable
- TTime
- TTimezone
- TTimezones
- TableField
- UserField
- UserFieldData
- ValidationResult
- Watermark
- WidgetRefWithValues
- ReplacementTypeEnumBase
- RoleType
- TApplication
- TBoolean
- TCategory
- TDirectory
- TFile
- TFloat
- TImage
- TJSON
- TLink
- TOAuth2
- TRole
- TString
- TUser
- Global constants
- Work with apps
- Web requests
- Access permissions
- Document flow
- Live Chats
- “Code” widget
- Signatures
- Business calendars
- Integration with IP telephony
- Integration with email marketing services
Report a mistake
There is a mistake in the following text:
Feedback sent successfully
Thank you for your input
Category (enumeration)
Usually, you don't need to create
TEnummanually. Options are generated automatically from the field settings and passed through [[EnumField. variants]]. When working with a form, you can add temporary options to the EnumField.data.variants property using a script. Such options are visible in the interface and can be used in the current form session. After page update, they are not saved, but selected values are available in the context of the current form instance. WhereTEnumis used:Context.fields.<field>.data .variants.Context.data.<field>(single:TEnum<T>; multiple:TEnum<T>[]).Type parameters
T: string
Hierarchy
Properties
code
Value’s code.
It is set once and used in the logic and comparison. Generated automatically from the name of the option or specified manually. Code transformation rules:
// Getting an option by its code const dict = Context.fields.category.variants; // Codes with symbols invalid for JS identifier are specified only in square brackets const vNum = dict['1n']; // Starts with a digit const vDash = dict['order-type']; // Includes a hyphen // Valid identifier is specified via a dot or in square brackets const v_Ok1 = dict. code1; const v_Ok2 = dict['code1']; // Setting selection for the Catgeory type field (Single) Context.data.category = v_Ok1; // Setting selection for the Category type field (Multiple) Context.data.category_multi = [ v_Ok1, vDash].filter(Boolean); // Adding available options to the interface using `data.variants` // Temporary options available only in the current form for testing or single actions Context.fields.category.data.variants. push({ code: 'temp_one', name: 'Temp ONE' }); Context.fields.category.data. variants.push({ code: 'temp_two', name: 'Temp TWO' }); // Gettings codes of selected values for the Category type field (Multiple) const selectedCodes: string[] = (Context.data.category_multi ?? []).map(v => v.code); // Getting codes of available options const availableCodes: string[] = Context.fields. category.data.variants.map(v => v.code); // Comparing by a code if ( v_Ok1.code === 'code1') { // ... } // Displaying the name of the option console.log(v_Ok1.name);name
The displayed name of the option visible to the user.
The value can be changed. It does not impact script execution.
Properties