Skip to main content
Version: 1.23.3

Choice Fields

A choice field provides several predefined options to choose from, and only one option can be selected.

In the SimpleOne interface, choice fields are displayed in two ways:

Drop-down list

Radio buttons

Create a choice field


This column value can store all kinds of symbols. By default, the string length is 80 symbols. You can change it in the Max length parameter.

When creating a Choice column, in addition to the mandatory fields, you need to fill in the following fields:

FieldMandatoryDescription
Column typeYSpecify the Choice column type.
MandatoryNSelect this checkbox to make the field mandatory (applicable for Choice columns with Choice type = Dropdown with -- None --).

Sources for choice options


There are three ways to define a set of choices for the drop-down lists:

  • by inheriting values from a parent table (if the current table is a child of another one).
  • by creating a set of records for this field in the Choice Options (sys_choice) table.
  • by defining a source table and its column in the Type Specification tab.

In the second case, you may need to create a different set of choices if the column is inherited and has predefined options. See Column Override to learn more.

In the third case, the available options are taken from a particular column of the source table. In the example below, the choice table Role contains a column Name. The choice options will be the values of the completed Name fields of the records in this table.

Create a choice option


caution

Before creating a set of options for a particular table and column, ensure that this column is already created. Navigate to System Settings → All Columns.

To create a choice option for a column table, perform the following steps:

  1. Navigate to the choice column, for which you need to create a set of options.
  2. In the Related Lists area, select the Choice tab.
  3. Click New and fill in the fields.
  4. Click Save or Save and exit to apply the changes.
note

You can also open the form the following way:

  1. Navigate to System Settings → Choice Options.
  2. Click New and fill in the fields.
  3. Click Save or Save and exit to apply the changes.

Note that in this case, you will need to fill in the Table and Column fields manually.

Choice option form fields

FieldMandatoryDescription
TableYSpecify the table to which this choice option is related.
Select the same table for the translated choice version as for the original one.
ColumnYSpecify the column to which this choice option is related.
Select the same column for the translated choice version as for the original one.
TitleYType the title of the option.
LanguageYSpecify the two-symbol name of the language (ru, en, and so on).
ValueYSpecify the value of the option.
OrderYEnter the number to define the option order in the choice list. The options are arranged in ascending order.
tip

A quick way to create several options for the same column is to use Make a copy:

  1. After saving a choice option, change the Title, Value, Order fields values.
  2. In the burger menu , select Make a copy. A copy of the current choice option record will be created and saved.

When creating a choice field option, it is recommended to set text values in the Value field to increase code readability. For example, it can be incoming, active, or failed values for Incoming, Active, and Failed choice options, respectively.

As for task states, it makes sense to make values numeric; this can help with selection construction in code.

Choice list translation


To create a translation for the choice options, complete the following steps:

  1. Navigate to System Settings → Choice Options.
  2. Open the option for which you need to create a translation.
  3. Enter the translation in the Title field and specify the language in the Language field.
  4. Click Make a copy. A copy of the current choice option for the specified language will be created and saved.
caution

Note that the Value field must remain unchanged.

If some choice options are not localized, the choice lists containing untranslated options will display them in English by default, regardless of the current user locale.