value
Value controls the dropdown-values of an item. There are different ways to use it:
value=<columnname>=*[=lenght]
|
existing values of the columns are translated. Maybe you need the length of the column
|
value=<columnname>
|
searches in the properties of the item for the command "values" or "value". If there is a command coded it gets executed: Only the content of the current item is searched, which means it is a quick search but not possible in lists.
values: all contents are determined and added
|
value=<columnname>=<sql-command>
|
The result of a SQL-command is inserted. Result of a SQL-command must be:
Column 1: the description
Column 2: the result of type CHAR
|
value=<columnname>=add=
• <description>=<value>=<descr>,<value>... |
The added values get added to the dropdown-list. "Description" gets translated, the value can include place-holders (e.g. <char 32> if a blank space should be the result)
|
value=columnname
The value command of the specified columnname is executed.
It must be declared in the propertied (t_init_<columnname> of the item.
Function is only executed if there is AT LEAST one row. If Rowcount=0 the command is ignored.
Usage:
Many tables have an identifier and a description, e. g. Grp_id,Bez
Saved is the identifier, displayed should be the description.
For this the translation from Grp_id to Bez is written to the CODETABELLE
value=columnname=*=<length>
The existing values of the column are translated. The identifier gets the specified length (if specified) because it has to match the column width.
Example 1
1. Protect the column (display only) and activate the CODETABELLE
2. Code to the properties of the column
// Dropdown with values as specified as below:
ddsql=*
// values for more results, value for one result!
// First the description, then the identifier
// ALL RESULTS HAVE TO BE CHAR!
values=select bez,convert(char(4),grp_id) from gruppe
3. Code to the Retrieve
value=grp_id
Example 2
1. Protect the column (display only) and activate the CODETABELLE
2.Code to the properties of the column (example):
value=select bez from gruppe where grp_id=<grp_id>
or if you want to access the whole table (less performance)
(use values instead of value)
values=select convert(char(4),grp_id),bez from gruppe
IMPORTANT: the result always has to be "CHAR"!
3. code to the Retrieve a link
value=grp_id
4. For changing the column, activate the dropdow
e. g.
ddsql=select grp_id,bez from gruppe order by bez
IMPORTANT: the DDVALUE-command. This specifies which text should be written to VALUES of the column.
|