Lycia LowCode Methods

GetCurrentDialog()

GetEventView()

GetEventSubInteraction()

GetCurrentEvent()

GetCurrentDialog()

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:

Note: One instance of InteractForm can have one or many instances of View referenced / stored in the views Hashmap.

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

 

Return to top

GetEventView()

The public method GetEventView() returns the name of the view in which the event is currently running:

PUBLIC FUNCTION (this InteractForm) GetEventView() RETURNS STRING

 

Return to top

GetEventSubInteraction()

The public method GetEventSubInteraction() returns the name of the sub-interaction in which the event is currently running:

PUBLIC FUNCTION (this InteractForm) GetEventSubInteraction() RETURNS STRING

 

Return to top

GetCurrentEvent()

The public method GetCurrentEvent() returns the raw event name that was currently running:

PUBLIC FUNCTION (this InteractForm) GetCurrentEvent() RETURNS STRING

 

Return to top

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.