|
This macro allows modifying the property of the application. The user can determine if a Form will start in insert mode, or a Grid starts by the filter, etc.
This macro must be used by one application to modify the properties of another application.
Properties for Form applications
| Property |
Value |
Description |
| start |
new |
Forces the form to start in the insert mode in order to add new records. |
| insert |
on/off |
Qualifies (on) or unqualifies (off) the "add new" button to allow the addition of new records. |
| update |
on/off |
Qualifies (on) or unqualifies (off) the "save" button on the form. |
| delete |
on/off |
Qualifies (on) or unqualifies (off) the "delete" button on the form. |
| field_display_off |
field |
Dynamically hides a field. |
| field_display_on |
field |
Dynamically shows a field. |
| field_readonly |
field |
Dynamically set the "read-only" attribute in order to select the field. |
| rows |
|
Forces the number of lines for each page (only for the form of multiple records). |
| rows_ins |
|
Forces the number of lines for insert (only for the form of multiple records). |
Property for Grid applications
| Property |
Value |
Description |
| start |
filter |
Forces the Grid to start by the filter. |
| cols |
|
Forces the number of columns. (vertical and slide kind) |
| rows |
|
Forces the number of lines per page. |
| lig_edit |
on/off |
Qualifies (on) or unqualifies (off) the record edition. (the pencil icon) |
Property for all applications
| Property |
Value |
Description |
| exit |
apl/URL |
Forces application to exit to a specified location. |
Ex. 1: Forces the "my_form" application to start in the addition mode. sc_apl_conf("my_form", "start", "new");
Ex. 2: Doesn't allow the "my_form" application make addition of new registers. sc_apl_conf("my_form", "add", "off");
Ex. 3: Sets "my_field" on the application "my_form" (readonly attribute) to "true" dinamically. sc_apl_conf("my_form", "field_display_off", "my_field");
Ex. 4: Shows "my_field" on the application "my_form" dinamically. sc_apl_conf("my_form", "field_display_on", "my_field");
Ex. 5: Forces the "my_grid" application to start by filter. sc_apl_conf("my_grid", "start", "filter");
Ex. 6: Forces the "my_grid" application to show 20 lines. sc_apl_conf("my_grid", "rows", "20");
Ex. 7: Hides "my_field" on the application "my_form" dinamically. sc_apl_conf("my_form", "field_display_off", "my_field");
Ex. 8: Use the button on the toolbar menu. if ({sc_menu_item} == "btn_1") { sc_apl_conf("form_customer", "start", "new"); }
|