There are three ways to use a form for interacting with Lycia LowCode:
1. Use a currently opened or currently focused form (the form is opened / focused somewhere in the 4GL sources prior to invoking the LowCode function call Interact()):
DEFINE iForm InteractForm
DEFINE l_settings InteractForm_Settings #required if you want to change the default behaviour of LLC
...
OPEN WINDOW WITH FORM "form/myForm"...
...
# To invoke the LLC engine, you can use either use Interact() or InteractForm()
CALL iForm.Interact()
# OR
CALL InteractForm(<l_settings>)
2. Call the function InteractFormFile() and specify the form file as a function argument:
CALL InteractFormFile("form/myForm")
#InteractFormFile is a wrapper function for simple form interactions
3. Specify the form file as Lycia LowCode setting:
DEFINE l_settings InteractForm_Settings
LET l_settings.form_file = "form/myForm"
CALL InteractForm(<l_settings>)
Note: Before proceeding, get acquainted with the Settings Levels section of LyciaLowCode Settings page (the concept of levels is essential for configuring multiple interactions and the multitable support).
The definitions like LET <setting_variable>.<setting_name> = <value> refer to the InteractForm_Settings level, while LET <setting_variable>.views["<db_table_name>"].<setting_name> = <value> refers to the View level.
This setting can be defined for:
InteractForm_Settings level: Yes
View level: No
form_file defines a path to the form file that should be opened and used for interaction. It’s a mandatory property for Interact() function of the InteractForm record and should be set before calling the function InteractForm(<settings_rec>).
This setting is ignored if you use InteractCurrentForm() function.
Setting format:
InteractForm_Settings.form_file STRING
Example:
l_settings here is the name for the settings record you define, and "../db_cms_activity/db_cms_activity_rec" is a path and a form file to use.