Types of data fields
Character fields
Character fields are useful when there is significant variation in the field contents or length of the content; for example, descriptive text, names of people, addresses, and keywords. You can attach a menu or a file system browser to character fields or fill them with default text.
For information about the expand box that appears next to character fields, see the Expand Box property description under Field-Properties. You can save character string with multiple lines in a character field without the Expand box. To include a tab in the text that you enter into a character field, press Ctrl+Tab.
Depending on the Input Length of a character field and the database, a character field is created either as a varchar or a clob database table column. If the Input Length exceeds the maximum for varchar a given the following table, a clob is used.
Database | Maximum Input Length for varchar |
---|---|
Microsoft SQL Server | 8000 |
Oracle | 4000 |
In the database, if you define date as a character field, the AR System server displays the date as it is on a form.
For example, in the database, if you define date as 12-Jan-2020, it is displayed as it is. If a AR System server uses an Oracle database, you can specify the default storage of CLOB (character large object) data by using the Store CLOB In-Row option on the Database tab of the AR System Administration: Server Information form (see Setting-database-options). To control how CLOB data is stored in individual character fields, use the CLOB Storage field property (see Field-Properties).
Currency fields
Currency fields are different from other fields in that they store multiple values when the data is saved. A currency field stores the following data:
- A user-entered decimal value—Decimal values are displayed according to the user's locale. For example, on German systems, thousands are separated by periods.
If users do not include a decimal point, the system automatically adds it when the field data is saved. The system also adds zeros after the decimal point based on the precision setting in the field's properties.
If a user enters the value in a specific currency and saves the entry, that currency is displayed to whomever views the entry. - A currency code, such as EUR (Euro) or USD (US dollar)—The codes are usually consistent with ISO 4217. You can override the codes with localized labels (see Localizing-currency-codes).
A currency code can be entered into the field in any of the following ways:- Default value—At runtime, a user can enter the code into the field or select the code from the menu attached to the field.
- User preferences—Users can specify a preferred initial currency type in the AR System User Preference form (Locale tab). When a user opens a new request, the code for the user-preferred currency appears in the currency field unless the code's currency type is not one of the field's allowable currencies. This user preference overrides the Initial Currency Type field property, but the Default Value field property overrides both the user preference and the Initial Currency Type.
- Initial currency type—Developers can specify an initial currency code in a currency field's Initial Currency Type or Default Value properties. The default value overrides the initial currency type.
- Primary allowable currency—If users do not specify a code, the system adds the code of the primary allowable currency when the request is saved.
- One or more functional currency values—Generated when users save the data that they entered in the currency field.
The first functional currency that is defined is special because it is used in workflow evaluations and in searches. It is critical that you define a currency exchange ratio entry between every currency type in which data can be entered and the first functional currency. See Creating-currency-exchange-ratios.
- Date on which the functional currency values were generated—After entering data into a currency field and saving the request, users can view the field's functional currency values by clicking the expand button next to the currency field, as shown in the following figure.
For more information, see See Creating-currency-fields.
Viewing functional currencies
In table fields, when users sort on a column that represents a currency field, records are grouped by currency type and then sorted within each group. This allows meaningful comparisons among currencies of the same type.
Web reports support currency fields, but do not support currency value and currency type. AR System reports support currency value and currency type.
Date and time fields
Following are the types of date and time fields you can use:
- Date/Time—Stores calendar dates and time together. You can set the Display Type property to Just Date or Just Time so that users see only the date or time.
AR System stores date/time values as the integer number of seconds since 00:00:00 GMT, January 1, 1970. Dates from January 1, 1970, through January 18, 2038, GMT are valid in date/time fields.
If users enter only a time, the current date is assumed. If users enter only a date, the time defaults to 12:00:00 A.M. - Date—Stores date information only as the number of days from the beginning of its range. Use a Date field to compare two dates or to perform calculations based on the date, such as calculating the number of days between two dates. Users can enter dates from January 1, 4713 B.C.E., to January 1, 9999 C.E.
Time—Stores time information only as the number of seconds from 12:00:00 A.M. Use a time field to compare two times or to perform calculations based on time, such as the number of elapsed seconds.
The value in a time field is independent of the time zone. While a date/time field adjusts the displayed value to reflect the user's time zone, the time value in a time field remains unchanged when displayed on the client.The following images show the date picker, date and time picker, and time picker, respectively:
The format for these fields matches the locale specified in the user preferences. If no user preference for locale exists, user environment settings are used (for example, Regional Settings Properties in the Windows Control Panel).
For information about workflow considerations for date/time, date, and time fields, see information about keywords and assigning values using function results in Defining-workflow-to-automate-processes.
Property for Date and Date/Time fields to support PWA
A property called Date Display Mode is added in Developer Studio for the Date and Date/Time fields to support the Progressive Web Application (PWA).
The Date Display Mode property can have the following values:
- Use System Defined (Default)—The Date and Date/Time fields display the system-defined mode to display a date.
- Absolute—The Date and Date/Time fields display the absolute mode to display a date.
- Relative—The Date and Date/Time fields display the relative mode to display a date.
Decimal fields
Decimal fields accept and contain fixed-point decimal numbers. Real fields and decimal fields differ in the following ways:
- Real numbers are inherently defined to be approximations, and decimal numbers are defined to be exact.
- Decimal numbers can have greater precision.
- The administrator has control over the fractional portion in a decimal field.
The total number of values in a decimal field can be as many as 28 places long. This number includes the decimal places (up to 9) that you define in the Precision field. You can control the precision of the number by defining where the decimal point is placed. Decimal fields appear right-justified. Decimal, digit grouping, and negative sign symbols are based on the locale specified in the user preferences. If no user preference for locale exists, user environment settings are used (for example, Regional Settings Properties in the Windows Control Panel).
You can use decimal fields to process statistical information in reports.
Diary fields
Diary fields capture the history of a request over time. Whenever users enter comments in the diary field, the new entry is appended to the previous diary entries. Every diary entry is stamped by the AR System server with a time and a user name. After they are saved, diary entries cannot be modified. (Web reports do not support diary fields.)
By default, AR System inserts a diary expand button to the right of each diary field. Users can click the button to open a Diary Editor dialog box. When the diary field contains entries, the icon changes from a blank book to an image of a book containing text.
A diary field displays whole words only. To see the text beyond the words displayed in the field, open the Diary Editor dialog box.
The default maximum size limit of data contained in diary fields varies per database:
- For Microsoft SQL Server databases, 2 GB
- For Oracle databases, 4 GB
To configure a different maximum limit for Oracle and Microsoft SQL Server databases, use the Db-Max-Text-Size option in the AR System Configuration Generic UI form. See Configuration-settings-C-D.
To search a diary field when using Oracle, you must configure AR System Configuration Generic UI form to allow searching on CLOB data types.
Consider the effect of searching on system performance. You might want to use FTS to create a search index for diary fields. Note that you cannot search for the time stamp or the name of the user who submitted an entry.
You cannot use the Indexes form property to create an index for a diary field. However, if you are licensed for full text search, you can use the Index For FTS field property to create a search index for the field. For more information, see Enabling-and-disabling-full-text-search.
Integer fields
Integer fields accept integer values between -2147483647 and 2147483647. You can use integer fields to process statistical information in reports.
Real fields
Real fields accept and contain floating-point numbers, which are useful for displaying very small and very large numbers. You can use real fields to process statistical information in reports.
For real fields, the representation in the database keeps a maximum of ten digits of data. After ten digits, the number is rounded, and the succeeding digits are ignored.
For example:
- If you enter 12345.090009, the value after submit is 12345.090010.
- If you enter 1234567.090099, the value after submit is 1234567.090000. (The last three digits are ignored because the rounded answer comes after the tenth position.)
Selection fields
Selection fields provide users a small number of choices. Selection fields are displayed as one of these types:
- Drop-Down List—Users can select from a list of items.
- Radio Button—Users can select only one item.
- Check Box—Users can define multiple items. But, check box for only first value is displayed.
Users cannot enter values that are not in the selection field. (This is one difference between selection fields and character fields with menus.)
Data for a selection field is stored in the database as an integer that relates to the order of the selection items. AR System can automatically generate item IDs, or you can create a custom ID for each item.
If you create the IDs, gaps can exist between the ID numbers, enabling you to insert new IDs later. For example, you might create these IDs:
Selection item | Custom ID |
---|---|
Open | 10 |
In Development | 20 |
In QA | 35 |
Closed | 39 |
At a later time, you can add a selection item and ID, such as Pending and 15, which is placed between Open and In Development.
If AR System numbers the IDs for you, do not change the order of existing selection items, or the meaning of data previously entered in the database is changed. For example, in a Status field, if the original items are New, Assigned, and Closed and you add an item labeled Fixed before the Closed item, existing database entries with a status of Closed change to a status of Fixed.
If you must add an item to a selection field on an active form, add it only as the last item. For example:
Assigned = 1
Closed = 2
Fixed = 3
For check boxes, you can define more than one choice, but users have access only to the first value.
You can create searches using the item IDs in the selection field. For example, the search string 'Status' < 2 searches for all New and Assigned requests in the previous example. The search string 'Check Box' = $NULL$ searches for requests in which the check box is not selected.
Use selection lists only in cases where you do not expect the options available to users to change over time. For more information, see Creating-selection-fields.