Feedback

Date

General Settings

Date field Configuration Interface. Date field Configuration Interface.

Data Type

Define the type of field. When setting it to Date, you can inform its format into this field.

Label

The Label option lets you define the title of a field. Example: If the database field name is “cmp_name_client”, You can display a different name for the user, like “Client Name”.

Do Not Repeat Value

Do not repeat the value of the field if it is the same as the previous record.

Displaying repeated values.

SQL Type

It informs the data type of field in the database.

Values Format

Format of Values with Regional Settings. Format of Values with Regional Settings.

Format of Values without Regional Settings. Format of Values without Regional Settings.

Regional Settings

It allows applying the Regional Settings to format the dates of the field. When not enabled, it displays the date separator attribute (Check the Regional Settings).

Display

It offers predefined formats for displaying dates.

Detail Mask

Define the format of the field in the Grid. It uses the patterns of PHP function Date.

d-m-Y 25-09-2009
F/Y September/2009
j/n/Y \a\s g:i:s A 25/9/2001 as 14:30:11 PM
l, d \d\e F \d\e Y Thursday, 25 of January of 2009
h:i:s 11:33:20
#h:i:s 123:43:27 (accumulating the hours)

Date Format Table

Internal Format

It allows defining the field format when the SQL type is different from Date. You must use the characters Y, M and D that correspond to Year, Month and Day.

  • Example 1 : If the field is storing the Date value in a char(8) where the positions 1 to 4 represents the year, the positions 5 and 6 is the month and the position 7 and 8 is the day, you must define the internal format as: YYYYMMDD
  • Example 2 : If the field is storing the Date value in a char(6) where the positions 1 and 2 represents the month and the positions 3 to 6 is the year, you must define the internal format as: MMYYYY

Lookup Settings

A method used to offer the user a list of values that can be selected in the form applications. For example, the gender field in the Database with the values M or W can be presented like Man or Women or in a dynamic way, having these values recovered from the database.

Lookup Settings Display for the field.

  • Lookup Methods

You will have available two types of lookup methods: Manual (informing manually the conditions of the select) or Automatic (using a database query).

Selecting the lookup type.

  • Lookup Method - Automatic

Automatic Lookup Interface.

  • SQL Select Statement : Define the SQL command that will recover the values that will be displayed on the form field. The command needs to have the following structure:
    SELECT display_field FROM table WHERE key_field = {grid_field}
    

The Grid field needs to be referenced buy the curly brackets {}. While running the application, the field within the curly brackets is replaced by it’s value in the table.

  • Multiple Values : When enabled, allows to select more than one item from the list, separated by a delimiter.
  • Delimiter : Defines the character used to separate the values selected in the form. Only inform a value to this field if you need to separate the selected options with a different delimiter then (;).
  • Use lookup in :
  • Grid : Applies the lookup to all the Grid formats (HTML, PDF, XML , CSV and RTF).
  • Summary : Applies the lookup only for the summary (HTML and PDF).
  • Both : Applies to both the Grid and Summary.
  • Default value : Defines the default value, used in the cases where the select command does not return any values.
  • Display original and lookup value : When selected No, its displayed on it the value from the select command. Otherwise, it will be displayed the original value of the field and the value returned from the select command separated by the character in the “Separated by” field.
  • Separated by : Defines which character will be used to separate the values of the field with the value returned from the lookup. It is only necessary to inform this value of the option Display original and lookup value is enabled.
  • Choose connection : Allows you to select another specific connection existing in the project. The select command will be done on the second connection.

Lookup Method - Manual

This method is used so that the developer can create manually the list of values that will be saved to the generated application. This method is mostly used when the database does not have a table that contains this information.

Manual Lookup Interface.

  • Lookup Type : Define the functionality of the lookup, being: Single Value, Multiple Values (delimiter), Multiple Values (position) and Multiple Values (binary).
  • Single Value :

It will be displayed only one value for the field. And it will replace the stored value from the table with the one defined on the item label.

Manual Lookup Interface.

  • Label : Text that will be displayed in the item list of the select field.
  • Value : Attribute that corresponds to the value that is stored in the table field. For example, the value M will be included into the table when the user will view in the list Man.

  • Multiple Values (Delimiter)

It can be displayed various values for the selected field. The values should be separated by a delimiter that will be informed. It is done a replacement on the parts of the field, separated by the delimiter, with the values contained in the list.

Manual Lookup Interface.

  • Label : Text that will be displayed in the item list of the select field.
  • Value : Attribute that corresponds to the value that is stored in the table field. For example, the value M will be included into the table when the user will view in the list Man.
  • Delimiter Characters used to separate Multiple Values in the table field. If not informed, the default delimiter is a semi coma (;).

  • Multiple Values (position)

Allows to store a diversity of information selected on the field in only one string. For this information to be added, you need to inform the label, initial position and the number of bytes that each information occupies on a string.

For this example, Gender, Marital status and Hobby were used. Gender uses one byte as does the Martial Status, the Hobby will use two bytes.

The example below:

Label Value Start Size
Man M 1 1
Women W 1 1
Divorced D 2 1
Single S 2 1
Study SD 3 2
Sports SP 3 2
Read RD 3 2

Example: Of you choose Man, Single and Read, in database would be stored the following value MSRD.

Manual Lookup Interface.

  • Label : Text that will be displayed in the Grid.
  • Value : Attribute that corresponds to the value that is stored in the table field. For example, the value M will be included into the table when the user will view in the list Man.
  • Start : Starting position of the string that is going to be stored. The first position is always 1.
  • Size : Amount of bytes that is going to occupy in the string.

Multiple Values (binary)

Allows to store a diversity of information selected on the field in only one value.

In this example uses the following list (although it is not informed when inserting values to the list, each item has a value applied automatically according to the order):

Attribute Value Lookup Description
1 Sports
2 Culture
4 Pleasure
8 Reading
16 Music

To store the data, it is done an internal sum of the decimal number. See the examples below.

Example 1: If the options Sports and Culture were selected, the number stored in the table would be 3.

Attribute Value Lookup Description
1 Sports
2 Culture
4 Pleasure
8 Reading
16 Music

1 (Sports) + 2 (Culture) = 3

Example 2: If the options Sports, Pleasure and Reading were selected, the number stored in the table would be 13.

Attribute Value Lookup Description
1 Sports
2 Culture
4 Pleasure
8 Reading
16 Music

1 (Sports) + 4 (Pleasure) + 8 (Reading) = 13

Manual Lookup Interface.

  • Label : Text that will be displayed in the Grid.
  • Insert Button : Adds to the list the values informed on the fields Label and Value.
  • Update Button : Modifies the attributes of the selected item.
  • Remove Button : Remove the selected item from the list.
  • Clear Button : Clear the Fields.
  • Save Button : Allows the user to save all the items of the list, to use on other fields, just click on Load lookup definition.
  • Load lookup definitions : Allows to refresh the list of values predefined when using the lookup. It will be listed the existing definitions in ScriptCase and the ones saved by the user.

  • Use lookup in :
  • Grid : Applies the lookup to all the Grid formats (HTML, PDF, XML , CSV and RTF).
  • Summary : Applies the lookup only for the summary (HTML and PDF).
  • Both : Applies to both the Grid and Summary.
  • Default value : Defines the default value, used in the cases where the select command does not return any values.
  • Display original and lookup value : When selected No, its displayed on it the value from the select command. Otherwise, it will be displayed the original value of the field and the value returned from the select command separated by the character in the “Separated by” field.
  • Separated by : Defines which character will be used to separate the values of the field with the value returned from the lookup. It is only necessary to inform this value of the option Display original and lookup value is enabled.