I have created a form for a master table, now I want to open another form displaying the details when right click a field and choose "Details".
How could I get the "ITEM ORDER" and pass the value to the new form to show the related information ? If it's not stated clearly, please comment. Thanks
One of the parameters of call_form or open_form procedure is a parameter list. You use this parameter list to pass parameters. On the calling form:
create a parameter list
add the parameter to the param
call_form using this parameter list:
DECLARE fParams ParamList := null; BEGIN fParams := Get_Parameter_List('SOME_NAME'); IF (not Id_Null(fParams)) THEN destroy_parameter_list(fList); END IF; fParams := Create_Parameter_List('SOME_NAME'); Add_Parameter(fParams, 'PARAM_NAME', TEXT_PARAMETER, 'PARAM_VALUE'); OPEN_FORM('Form_Name', ACTIVATE, SESSION, NO_SHARE_LIBRARY_DATA, fParams); END;
On the Called Form:
You must declare the parameter on the Parameters section, with the same name as the one used in add_parameter. After that you can reference the parameter by using :parameter.param_name.
One word of caution: You can not use :parameter
in the where clause of data blocks. Copy the parameter to another data block item and use this one.