The GetCurrentDialog() method is an instance method of the InteractForm and View objects:
# PUBLIC FUNCTION (this InteractForm) GetCurrentDialog() RETURNS Ui.Dialog
# PUBLIC FUNCTION (this View) GetCurrentDialog() RETURNS Ui.Dialog
Common information:
TYPE InteractForm RECORD #
form_file STRING # The form file that should be opened
, log_file STRING # The path to log file. It's optional property
, log_to_file BOOL # Indicates if error message should be logged to file
, translations HASHMAP OF STRING # Map of message/table/column translations
, views HASHMAP OF View # A set of views of tables that are depends each other
, custom VARIANT # The placeholder for any additional custom values that can be usefull to keep in object
END RECORD #
iForm.GetCurrentDialog() returns the dialog object (ui.Dialog) of the InteractForm object.
iForm.views["<table_name>"].GetCurrentDialog() returns the dialog object (ui.Dialog) of the specified View of an InteractForm object.
Example:
FUNCTION i_p_policy_actions_insert_after_field(iform InteractForm INOUT) RETURNS BOOL
DEFINE dlg ui.dialog
LET dlg = iForm.views["policy"].GetCurrentDialog()
LET field_id = dlg.getCurrentItem()
LET _rec_policy = iForm.views["policy"].GetViewCurrentRecord()
CASE dlg.getCurrentItem()
...
WHEN "policy.client_no"
IF _rec_policy.client_no < 1 OR _rec_policy.client_no IS NULL THEN
ERROR "Client Number can not be empty, 0 or negative"
CALL dlg.nextfield("+PREV")
END IF
...
END CASE
CALL iForm.views["policy"].SetViewCurrentRecord(iForm, _rec_policy)
RETURN FALSE
END FUNCTION
The public method GetEventView() returns the name of the view in which the event is currently running:
The public method GetEventSubInteraction() returns the name of the sub-interaction in which the event is currently running:
The public method GetCurrentEvent() returns the raw event name that was currently running: