|
This macro has the objective to block the typing on determining fields in the lines of the Multiple Record form, Editable Grid, and Editable Grid View.
Fields that are supposed to be blocked should be applied the options, "true" ( To block) or "false" ( to unblock). If not informed, the default value is "true".
The optional parameter is using the “I” to block while inserting a new record and “U” to block while updating a record. If not informed, Scriptcase will block on both occasions by default.
Ex. 1: Blocking the field while including and updating. sc_field_disabled_record(“Field_01");
Ex. 2: Unblocking the field while including and updating. sc_field_disabled_record(“Field_02=false");
Ex. 3: Blocking the various fields only when updating. sc_field_disabled_record(“Field_01; Field_02; Field_03", "U");
Ex. 4: Combination of blocking and unblocking various fields while including and updating. sc_field_disabled_record("Field_01=true; Field_02=false; Field_03=true");
The macro can also work within a condition, blocking a specific field on the record line.
Example 1: if ({Filed_01} == 1) { sc_field_disabled_record("Field_03"); }
Example 2: switch(trim([arr_apps][ {app_name} ])) { case 'form': break; case 'calendar': sc_field_disabled_record("priv_export; priv_print"); break; case 'cons': sc_field_disabled_record("priv_insert; priv_delete; priv_update"); break; default: sc_field_disabled_record("priv_insert; priv_delete; priv_update; priv_export; priv_print"); break; }
|