Which of these trigger codes will achieve the required functionality?

In a multiform application, one form must invoke another. The form modules are called Customers and Orders internally, but the compiled files are saved as CUST.FMX and ORD.FMX, respectively. There is a button in the Customers form with a When-Button-Pressed trigger to invoke the Orders form. There is a requirement that only one Orders form can be running at a time, so the trigger must check to see if the form is already open. If it is open, the focus must be sent to it. If it is not open, it has to be opened. Which of these trigger codes will achieve the required functionality?

In a multiform application, one form must invoke another. The form modules are called Customers and Orders internally, but the compiled files are saved as CUST.FMX and ORD.FMX, respectively. There is a button in the Customers form with a When-Button-Pressed trigger to invoke the Orders form. There is a requirement that only one Orders form can be running at a time, so the trigger must check to see if the form is already open. If it is open, the focus must be sent to it. If it is not open, it has to be opened. Which of these trigger codes will achieve the required functionality?

A.
IF NOT FIND_FORM(‘ord’) THEN
OPEN_FORM(‘ord’);
ELSE
GO_FORM(orders’);
END IF;

B.
IF ID_NULL(FIND_FORM(‘ord’)) THEN
OPEN_FORM(‘orders’);
ELSE
GO_FORM(ord’);
END IF;

C.
IF ID_NULL(FIND_FORM(‘orders’)) THEN
OPEN_FORM(‘ord’);
ELSE
GO_FORM(orders’);
END IF;

D.
IF NOT FIND_FORM(‘orders’)) THEN
OPEN_FORM(‘orders’);
ELSE
GO_FORM(orders’);
END IF;



Leave a Reply 0

Your email address will not be published. Required fields are marked *