Spinner
Spinner is a numeric spinning text box that spins between the bounded minimum and maximum values.
- Form Items >Data Entry >Spinner
Assigning number lengths and decimal values for Spinner form item
To assign number lengths and decimal values for the spinner form item, you have to specify the JSON structure to assign the relevant number lengths and decimal values for the spinner form item in the APPLICATION_CONFIG column present in the FORM_ITEM_DEFINITION table in the Canvas schema. The number length denotes the digits of the provided number, e.g. 25,000. While, the decimal values indicate the decimal digits of the provided number to be used in the spinner field, e.g. 24,000.221. The following code snippet serves as a sample reference:
{ "minValue":"0", "maxValue":"25000", "noOfDecimals":"3" }
The minimum value (minValue) indicates the minimum value of the number length to be provided in the spinner field, e.g. 0. The maximum value (maxValue) indicates the maximum value of the number length to be provided in the spinner field, e.g. 25,000. The number of decimals (noOfDecimals) indicates the number of decimal digits to be provided in the spinner field, e.g. 3. For instance, only numbers with three decimal digits can be provided in the spinner field, e.g. 24,000.221. You can specify the numbers of your choice for the minValue and maxValue elements. Similarly, you can even specify the number of the decimal digits of your choice for the noOfDecimals element.
The sample DB entries must be provided in the FORM_ITEM_DEFINITION table to assign number lengths and decimal values for the spinner form item are listed as follows:
In the following example, the provided DB entries are associated with the MySQL database. However, the following listed DB entries are applicable for other databases like Oracle, Postrgre and MSSQL.
Column Names | Column Values |
---|---|
APPLICATION_ID | MODELHOUSE |
FORM_ID | NEW_FORM |
ITEM_ID | SPINNER_FIELD |
PARENT_ID | NEW_FORM |
POSITION | 1 |
ITEM_TYPE | 8 |
DISPLAY_NM_KEY | (NULL) |
PLAIN_LBL | SPINNER FIELD |
LAYOUT | (NULL) |
ANCHOR | 100 |
BUNDLE_KEY | common |
MIN_LENGTH | 0 |
MAX_LENGTH | 1000 |
MAX_NUM_LINES | (NULL) |
MAX_CHAR_PER_LINES | (NULL) |
TOTAL_COLS | (NULL) |
ROW_SPAN | (NULL) |
COL_SPAN | (NULL) |
VALIDATION_TYPE | (NULL) |
RAW_KEYS | (NULL) |
RAW_VALUES | (NULL) |
INCLUDE_SELECT_IND | N |
CONTAINER_IND | N |
VISIBLE_IND | Y |
EDITABLE_IND | Y |
READ_ONLY_IND | N |
REQUIRED_IND | N |
LOOKUP_IND | N |
COLLAPSIBLE_FIRST_IND | N |
DS_VIEW_IND | (NULL) |
DS_KEY_COLUMN_ID | (NULL) |
DS_VAL_COLUMN_ID | (NULL) |
WIDGET_ID | (NULL) |
CONDITIONAL_IND | N |
CACHE_DATA_IND | N |
VALIDATE_ON_SWITCH_IND | N |
CRITERIA_ID_REQ_IND | N |
CONTEXT_CONTAINER_IND | N |
HIDE_LABEL | N |
MULTI_LANG_IND | N |
UPLOAD_FILE_FORMATS | (NULL) |
RESIZABLE_IND | N |
LINKED_CURR_COL | (NULL) |
LABEL_ALIGN_TYPE | top |
APPEND_CURRENCY_MODE | (NULL) |
INITIAL_MULTIPLICITY | (NULL) |
PRINT_REQUIRED_IND | Y |
TOGGLE_IND | N |
CHANNEL_ID | A |
LABEL_CHAR_COUNT | (NULL) |
HELP_ICON_IND | N |
COPY_PASTE_IND | N |
PRODUCT | (NULL) |
SUB_PRODUCT | (NULL) |
FUNCTION_CODE | (NULL) |
INPUT_ACTION | (NULL) |
APPLICATION_CONFIG | { "minValue":"0", "maxValue":"25000", "noOfDecimals":"3" } |
EVENT_CONFIG | (NULL) |
VALIDATION_CONFIG | (NULL) |
LOV_CATEGORY | (NULL) |
LOV_PARENT_ID | (NULL) |
LST_UPD_DT | 2021-10-07 08:26:12 |
The following screen shot showcases the spinner field with a provided minimum length value, e.g. 0, in the functional application, Modelhouse:
The following screen shot showcases the spinner field with a provided minimum length value, e.g. 25,000, in the functional application, Modelhouse:
The following screen shot showcases the spinner field with three decimal digits, e.g. 24,000.221, in the functional application, Modelhouse:
The following table provides information about the properties that are applicable to the spinner form item:
# | Property | Description | Sample Values |
---|---|---|---|
1 | Form ID | Unique ID of the Form on which you want to place the Form Item. | DETAILS_FORM |
2 | Item ID | Unique ID to the Form item. | SPINNER_FIELD7 |
3 | Item Type | To identify the item type in a form. | SPINNER |
4 | Channel | Assigns the form item compatibility for various devices. | Desktop / Tablet / Mobile |
5 | Bundle Key | Name of the key associated with the property file which provides the localized label text for the current form item. | common |
6 | Plain Label | Text entered in Plain Label field appears as the label of the form item without the resource bundle key translation. 18.1: If you are using the property files, leave the Plain Label field as blank. Display Name Key is the property-driven label key for the form item. 19.1: In Canvas 19.1, the Display Name Key field is a configuration-driven label key for the form item. See About Display Name Key and Plain Label from 19.1 and Managing Display Names for Forms for more information. | |
7 | Display Name Key | Number of Days | |
8 | Edit | Selected: Renders the Form in edit enabled mode. | Not applicable |
9 | Visibility | Selected: Shows the form item on the Form. | Selected |
10 | Help | Selected: Renders the form item with a help icon. | Selected |
11 | Anchor | Defines the size of the form item in terms of percentage (without % symbol). | 50 |
12 | Selected: Allows printing the form item while printing the form. | Selected | |
13 | Column Span | Occupies the specified number of item spaces horizontally for the current item. | 1 |
14 | Label Alignment | Indicates the alignment of the labels of the form items. | Top |
15 | Hide Label | Selected: Hides the label of the form item. | Selected |
16 | Mandatory | Selected: Shows the red asterisk ({}{*}) on the label of the form item, and converts the particular field as mandatory. | Selected |
17 | Conditional Mandatory | Selected: Shows the blue double asterisks ({}{}) on the label of the form item, and converts the particular field as conditional mandatory. | Selected |
18 | Add Icon | By making use of Add Icon option, you can add an icon to the form item. Perform the following steps for adding an icon to a form item:
| De-Selected |
19 | Switch | Enables you to switch from one form item to another form item along with the applicable properties and their values. To switch from one form item to another form item, execute the steps that follow:
| NA |
20 | Clone | Enables you to create a duplicate of the selected form item along with its applicable properties except for the Item ID. | 2 |
21 | Minimum Input Size | Indicates the minimum number of characters within the text controls. | Not applicable |
22 | Maximum Input Size | Indicates the maximum number of characters within the text controls. | Not applicable |
23 | Multilingual Input Allowed | Selected: Supports the multilingual characters to be entered into the form items. | Not applicable |
24 | Event Wiring | The Event Wiring option enables you to assign various events for different set of actions. For detailed information on Event Wiring, refer Form Items Event Wiring. |