Text
General Settings
This type of field allows the developer to create quickly fields to display data from the database, where the final user can see the data in the way it was set by the developer.
Type of Data
Defines the type of the field in the application. In this case we should select Text.
Label
Defines the title that will be displayed in the field when the application is executed. The terminology used in the interface is fundamental to the system have a good usability, whe should use names and familiar terms to the final user of the application, instead of using terms from the system.
For example, this text field that has the name customerid, the client would have a much better understanding of the functionality of the field when we define the label as Customer Name.
Not only a fixed text, the Label attribute allows the use of langs to define the field’s title, making it possible to use your application in a multi language project.
Case Settings
This option allows the developer to inform how the text will be displayed in runtime.
The options available are:
Lower Case: Every letter in the text will be converted to lower case.
Upper Case: Every letter of the text will be converted to upper case.
Capitalize first word: The first letter of the first world will be converted to upper case.
Capitalize all words: The first letter of every words will be converted to upper case.
Show HTML Content
When this option is active every HTML, CSS and JavaScript content that are in the database will be displayed with the main value.
Field Mask
Defines the field mask. There are two types of mask described in the table below:
Character | Description |
---|---|
X | It is overridden by any characters returned by the database. Filled is required and the value will be completed with leading zeros when there are fewer characters than the size of the mask. |
Z | It is overridden by any characters returned by the database. Its filling is optional and when there are fewer characters than the mask size, nothing will be done about the characters that are missing. In addition the leading zeros will be suppressed. When used in conjunction with the X necessarily the use of this character is to the left of the mask. |
9 | It represents any numeric character (from 0-9) |
A | It represents an alpha numeric character (A-Z,a-z) |
* | It represents any alpha-numeric character (A-Z,a-z,0-9)entered by the user. |
For example, it is possible to set the mast to display a telephone number:
It will be show with this format on runtime:
It is also possible to set the field mask like those examples:
Field mask examples:
Telephone number
Field | Mask Input | Typed Value | Formatted Value |
---|---|---|---|
Phone Number | +99 99 9999 - 9999 | 123456789012 | +12 34 5678 - 9012 |
Phone Number | (xx) xxxx - xxxx | 12345678 | (00) 1234 - 5678 |
Phone Number | (xx) xxxx - xxxx | 1234567890 | (12) 3456 - 7890 |
Phone Number | (zz) xxxx - xxxx | 12345678 | ( ) 1234 - 5678 |
Software Key (Letters only) | AAAA-AAAA-AAAA-AAAA | QWERTYUIASDFGHJK | QWER-TYUI-ASDF-GHJK |
Software Key (Letters and numbers) | xxxx-xxxx-xxxx-xxxx | Q1W2E3R4T5Y6U7I8 | Q1W2-E3R4-T5Y6-U7I8 |
License Plate | AAA - 9999 | QWE1234 | QWE - 1234 |
Scriptcase Serial Key | A999A999A999-** | D111H111G111DG2P | D111H111G111-DG2P |
Multiple masks (Phone Number) | 9999-9999;(99)9999-9999; | 9999 999 9999 | +99 99 9999-9999 |
Repeat Value:
When this option is active the value of the field will be repeated if the previous database register is the same.
Example:
SQL Type
Informs the type of the field in the database.
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 Methods
You will have available two types of lookup methods: Manual (informing manually the conditions of the select) or Automatic (using a database query).
- Lookup Method - Automatic
- 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.
- 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.
- 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.
- 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.
- 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
- 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.
Display Settings
The Display Settings allows to define the CSS values individually for each field. For each Display schema of scriptcase, there are the same attributes available in Interface.
Display Settings configuration Interface.
- Display Settings
- Text Font : Allows choosing the font type, which will be applied in the application field.
- Font Size : Allows choosing the font size, which will be applied to the application object.
- Italic Text : Allows to apply the italic type in the font.
- Bold Text : Allows you to apply bold type to the font.
- Number of characters : Number of characters to display.
- Text Alignment : Allows you to position the field in the desired location (left, right, center and justified).
- Vertical Alignment : Allows you to position the field in the desired location (top, middle or bottom).
- Background Image : Allows you to add a background image to the field.
- Line Break : Enables the possibility of a line break for the field.
- Content color : Changes the content color of the query field and the grouped field, when available.
- Background color : Allows choosing the color, using a color palette to be applied as the background of the application field.
- Width : To define the width of the field.
- Height : To set the height of the field.
- Title Horizontal Alignment : Allows you to define the horizontal alignment for the field title (left, right or centered).
- Title Vertical Alignment : Allows you to define the vertical alignment for the field title (top, middle or bottom).
- Title color : Allows you to choose a color for the field title using a color palette.
- Title background color : Allows choosing a color for the background of the field title using a color palette.
- Bold : Displays the field title in bold
PDF Configuration
Line Break
This option allows breaking the line in the PDF file when exported.
Chart Settings
By using this option, you will see an icon on the Field Title, this icon displays a chart relating to the field.
On this type option you need to choose two columns to build the chart. The first one is the field its self that you are working with, and the second one is the you chose and is called “Column for Label”.
Bar Chart Interface.
- Group by Label : Groups the values of the column by the label. Similar to the effect of the group by of the a Select.
- Summary Function : Function that summarizes the data applied to the column. The functions that can be used on the field are the following: Count, Sum, Max, Min and Avg.
- Configurable Chart : Allows the user to setup the parameters of the chart creation when the application is running.
- Display Values : Displays the values of the generated chart.
- Column for Label : Selecting the column that will be the label for the field.
- Chart Width : Width of the chart, in pixels.
- Chart Height : Height of the chart, in pixels.
Chart Layout
Chart layout settings interface.