Enterprise Communication Interface (ECI)

eci_upd_rel

Description

Update record in a relation list.

  • Opens mask of entity 1.
  • Opens relation list.
  • Checks if relation record exists.

    No:

    • Cancels function and returns error code.

    Yes:

    • Checks if you have write access to father record and check if father record is reserved by currrent user if flag res_check is "on" or "reset:

      No:

      • Cancels function and returns error code.

      Yes:

      • Updates fields 'upd_fld_nam'.
      • Modification of values by user in interactive mode.
      • Calls fields and list triggers.,
      • Stores record.

        If res_check="reset", de-reserves record.

      • Returns values of return fields and closes mask.

 

Input parameter

fat_ent_nam

string name of entity 1 ("father")

fat_wdg_nam

string name of mask of entity 1

fat_wdg_ext

string activate system fields on list of entity 1 {"on", "off"}

fat_wdg_mod

string mode of widget of entity 1 {"list","form","bvb"}

res_flag

string allow insert only if father record is reserved {"on","off","reset"}

act_mod

string mode of interaction {"int","bat"}

fat_sel_nam

stringlist names of fields for selection of father record

fat_sel_val

stringlist values of fields for selection of father record

son_ent_nam

string name of entity 2 ("son")

rel_vie_nam

string view name of relation

rel_ref_agg

string direction of relation {"ref","agg"}

rel_wdg_nam

string name of relation list

rel_wdg_ext

string activate system fields on relation list {"on", "off"}

rel_wdg_mod

string mode of relation widget {"list","form","bvb"}

sel_fld_nam

stringlist names of fields for selection of relation record

sel_fld_val

stringlist values of fields for selection of relation record

upd_fld_nam

stringlist names of fields to write

upd_fld_val

stringlist values of fields

ret_fld_nam

stringlist names of return fields

optimize

string With this parameter a database update is only done if the old and new values differ (and therefore, the modification date is not changed if the values are the same).
on = before writing the values of input parameter upd_fld_val it is checked whether the old value differs from new value. Only in this case the "new" value is written in field.
off = Value of upd_fld_val is written to field.

Output parameter

ret_fld_val

stringlist values of return fields

 

Example

Update item-document relation record

Input parameter:

fat_ent_nam "EDB-ARTICLE"
fat_wdg_nam "EDB-ART-SLI"
fat_wdg_ext "off"
fat_wdg_mod "list"
res_flag "off"
act_mod "int"
fat_sel_nam "T_MASTER_DAT.PART_ID"
fat_sel_val "art001"
son_ent_nam "EDB-DOCUMENT"
rel_vie_nam "STR"
rel_ref_agg "ref"
rel_wdg_nam "EDB-ART-DOC-RLI"
rel_wdg_ext "off"
rel_wdg_mod "list"
sel_fld_nam "T_MASTER_DOC.POS_NO"
sel_fld_val "10"
upd_fld_nam "T_MASTER_DOC.POS_NO"
upd_fld_val "1"
ret_fld_nam "T_MASTER_DOC.POS_NO"