Form Modifier
When base form data presentation is depended on the statuses of the data, we can apply the form modifiers to modify the original base form presentation accordingly.
For form fields, depended on its original status (readonly/editable), they may be changed from editable to readonly / invisible, or from read-only to invisible; and for menus, toolbars and navigation pages, they can be switched between accessible and un-accessible.
Steps to use modifiers
  • First build a modifier for each case, and assign a unique reference key to it; these reference keys only need to be unique base-form wide.
  • In the base form's View SQL, link its modifier(s) to the corresponding statuses through data column mod_code. Below takes Single-Value Picker base form as example:
    SELECT case data_type when 'lookup' then 'svp-lookup'
    when 'number' then 'svp-number'
    when 'select' then 'svp-select'
    else 'svp-others' end as mod_code,
    title, ref_key, field_title, 
    data_type,msg_text, [db_id], data_src, 
    lu_Class, num_type, num_acc, default_val
    FROM lgwSingleValuePicker WHERE id=@recId
    For the complicated status cases, we suggest to use stored procedure to implement base form's view SQL.
  • The base form's submit form (logicWebSubmit) has an hidden field: logicWebModifier. Change this field's default value will override the base form view SQL's modifier value.
    logicWebSubmit.logicWebModifier.value='set-your-modifier-ref-key';