設定應用程式的屬性;例如可以設定 表單Form程式起始在新增模式、或是 表格Grid起始在搜尋等。 這支 Macro 一定只能在一個應用程式中去修改另一個應用程式的屬性! 因為自己不能修改自己:自己已經啟動,已經在跑了,不能再修改自己的啟動模式。
This macro allows to modify the property of the application. The user can determine if a Form will start in insert mode, or a Grid starts by 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 addtion 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 | Dinamically hides a field. |
field_display_on | field | Dinamically shows a field. |
field_readonly | field | Dinamically set the "readonly" attribute in order to select the field. |
rows | | Forces the number of lines for each page (only for form of multiple records). |
rows_ins | | Forces the number of lines for insert (only for 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");
}
|
沒有留言:
張貼留言