Reading Records with Virtual Widgets

If you read data from the data base, this is no problem with regard to the consistency of the data model. For this kind of operation programming with virtual widgets is a very simple method.

Program the following sequence to read data from the data base:

  1. Set the widget virtual mode with the function dal_wdg_set_vir (flg = 1).

  2. Create the widget. For an entity widget, for instance, you would use the function dal_iwf_lis_ent.

    In case of relations widgets you should always specify the full name of the relation (entity-1, entity-2 and view) and then define the parent element of the relation with the function dal_wdg_set_ide.

  3. If required, enter search terms into the query buffer of the relevant mask fields with the function dal_mas_wri_sel.

  4. Execute a data query with the function dal_wdh_upd_lis.

    Via the function dal_mas_ret_len_rec you can determine the number of records found.

  5. Read and edit the mask data with the available standard functions.

    For instance, you could read a field entry with dal_mas_rea_fld.

  6. Delete the virtual widget with dal_wdg_del_wdg and deactivate the widget virtual mode via dal_wdg_set_vir (flg = 0).