This method allows a LowCode data source View to use data of a variable (array of records) handled / managed by your 4GL code instead of a database table.
It accepts the DYNAMIC ARRAY OF RECORD as the parameter:
The array members should have the same names as the form field Identifiers where the data will be displayed.
Example:
FUNCTION init_embedded_array_data()
LET _arr_rec_contact[1].cont_id = i
LET _arr_rec_contact[1].cont_fname = "Alex"
LET _arr_rec_contact[1].cont_lname = "Williams"
LET _arr_rec_contact[2].cont_id = i
LET _arr_rec_contact[2].cont_fname = "Angela"
LET _arr_rec_contact[2].cont_lname = "Hoelzl"
END FUNCTION
FUNCTION contact_activity_list(p_rec_settings InteractForm_Settings)
LET p_rec_settings.form_file = "../demo_contact_activity_embedded/contact_activity_list"
CALL init_embedded_array_data() #populate array record 'contact' with data
CALL p_rec_settings.views["contact"].SetEmbeddedData(_arr_rec_contact)
CALL InteractForm(p_rec_settings)
END FUNCTION
There are some specifics to this method's use: