AddPageFieldMenu method: RCServiceConfig class

Syntax

AddPageFieldMenu(page_fld_ID, pg_rec_fld_ID)

Description

Use the AddPageFieldMenu method to instantiate and return a PTCS_MENULAYOUT:RCMenuLayout object. The object can represent an existing menu layout configuration or a new configuration depending on the parameters passed.

Parameters

Parameter Description

page_fld_ID

Specifies a string value representing the page field’s ID in the following format:

PAGE_NAME.field_ID

The field ID can be obtained from the Order tab of the page definition in Application Designer. For example:

QE_BOOK.2

pg_rec_fld_ID

Specifies a string value representing the page record field’s ID in the following format:

occurs_lvl.RECORD_NAME.FIELD_NAME.field_ID

The occurs level, record name, field name, and field ID can be obtained from the Order tab of the page definition in Application Designer. For example:

0.QE_BOOK.QE_BOOK_NAME.2

Returns

A PTCS_MENULAYOUT:RCMenuLayout object.

Example

import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;
import PTCS_SRVCONFIG:RCMapFields;
import PTCS_MENULAYOUT:RCMenuLayout;

Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig;
Component PTCS_SRVCONFIG:RCMapFields &rcMapFields;
Component PTCS_MENULAYOUT:RCMenuLayout &rcMenuLayout;

&rcService = create PTCS_SERVICE:RCService("EMPLOYEE", "QE_NUI_RI_GBL");
&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&rcMapFields = &rcServConfig.AppendMapField("0.QE_BOOK.QE_BOOK_NAME.2");
/* Required value for the ParameterName property */
&rcMapFields.ParameterName = "PTCS_MENUFIELD";
&rcMapFields.PnlName = "QE_BOOK";
&rcMapFields.MapFieldType = "PF";
&rcMapFields.RefreshService = "N";
&rcMapFields.MapNullValue = "N";
&rcMapFields.FieldMenuOpt = "Y";
&bRet = &rcMapFields.Save();
&bRet = &rcServConfig.Save();
&rcMenuLayout = &rcServConfig.AddPageFieldMenu("QE_BOOK.2", "0.QE_BOOK.QE_BOOK_NAME.2");
If (&rcMenuLayout <> Null) Then
   /* do some processing */
   &bRet = &rcServConfig.Save();
End-If;