Multiple choice

The database EMPLOYEES table has a foreign key constraint referencing the DEPARTMENTS table. A Human Resource application is being developed. HR clerks use the Employees form to query, update, and insert employee records. They occasionally attempt to add an employee who is in a new department that has not yet been entered into the database. When this happens, they receive an error indicating that the parent record cannot be found, so they cannot commit the employee record. The HR clerks have requested that a button be placed on the form to enable them to invoke the Departments form to enter the new department and save it independently. They want to be able to return to the Employees form and decide whether or not to save the new employee record. How should the When-Button-Pressed trigger be coded to achieve this?

  1. CALL_FORM('Departments);

  2. CALL_FORM('Departments',NO_HIDE);

  3. OPEN_FORM('Departments');

  4. OPEN_FORM('Departments', ACTIVATE, SESSION);

  5. OPEN_FORM('Departments', NO_ACTIVATE, NO_SESSION);

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

OPEN_FORM with the ACTIVATE and SESSION parameters opens the Departments form in a separate session while keeping the Employees form available. This allows clerks to enter and save the new department independently, then return to decide about the employee. CALL_FORM would replace the form entirely, and NO_ACTIVATE/NO_SESSION would not provide the needed independence.