RCServiceConfig Class Methods

In this section, the RCServiceConfig class methods are presented in alphabetical order.

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

Field or Control

Definition

page_fld_ID

Specifes 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

Specifes 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;

Syntax

AppendMapField(pg_rec_fld_ID)

Description

Use the AppendMapField method to instantiate a PTCS_SRVCONFIG:RCMapFields object. This method associates the page record field passed in as the pg_rec_fld_ID parameter to a map parameter.

Parameters

Field or Control

Definition

pg_rec_fld_ID

Specifes 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_SRVCONFIG:RCMapFields object.

Example

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

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

&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&rcMapFields = &rcServConfig.AppendMapField("0.QE_BOOK.QE_BOOK_NAME.2");
Local boolean &bRet = &rcServConfig.Save();
If (&rcMapFields <> Null) Then
   /* do some processing */
End-If;

Syntax

CloneForNew(&RCsrvc_cnfg)

Description

Use the CloneForNew method to create an identical copy of the related content service configuration executing this method to an already instantiated PTCS_SRVCONFIG:RCServiceConfig object but without copying the menu layout. Use this method when the menu layout need not be copied—for example, with the service configuration for pivot grids.

Parameters

Field or Control

Definition

&RCsrvc_cnfg

Specifies an already instantiated PTCS_SRVCONFIG:RCServiceConfig object that the configuration is copied to.

Returns

A boolean value: True if the copy is successful, False otherwise.

Example

import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;

Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig, &rcServConfigClone;

&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&bRet = &rcServConfig.CloneForNew(&rcServConfigClone);
If (&rcServConfigClone <> Null) Then
   /* do some processing */
   &bRet = &rcServConfigClone.Save();
End-If;

Syntax

CloneForNewFull(service_lbl, service_ID, &dest_cmp, page_fld_ID, pg_rec_fld_ID, folder_lbl)

Description

Use the CloneForNewFull method to instantiate a new PTCS_SRVCONFIG:RCServiceConfig object by copying the current related content service configuration object executing the method. (The system generates a new instance ID.)

.

Parameters

Field or Control

Definition

service_lbl

Specifies the service label for the new service configuration as a string value.

service_ID

Specifies the service ID for the new service configuration as a string.

&dest_cmp

Specifies destination portal and component to copy the service configuration to as an already instantiated PTCS_SERVICE:RCService object.

page_fld_ID

Specifes 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

Specifes 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
folder_lbl

Specifies the menu folder label name as a string value.

Returns

A PTCS_SRVCONFIG:RCServiceConfig object.

Example

import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;
import PTCS_MENULAYOUT:RCMenuLayout;
import PTCS_MENULAYOUT:RCMenuFolder;
import PTCS_MENULAYOUT:RCMenuLink;

Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig, &rcServConfigClone;
Component PTCS_MENULAYOUT:RCMenuLayout &rcMenuLayout;
Component PTCS_MENULAYOUT:RCMenuFolder &rcMenuFolder;
Component PTCS_MENULAYOUT:RCMenuLink &rcMenuLink;

&rcService = create PTCS_SERVICE:RCService("EMPLOYEE", "PT_USERMAINT_GBL");
&rcService.MenuName = "MAINTAIN_SECURITY";
&rcService.PnlGrpName = "USERMAINT";
&rcService.ExpandFrame = "N";
&rcService.MinPagelets = 0;
&rcService.RcFrameLoc = "S";
&rcService.LanguageCd = "ENG";
&bRet = &rcService.Save();

&rcServConfig = &rcService.AddNewService("CLONE_RCPGLT", 0);
&rcServConfig.IsCompService = "C";
&rcServConfig.PnlName = "";
&rcServConfig.SeqNum = 0;
&rcServConfig.HideFromSearch = "N";
&rcServConfig.IsDefault = "N";
&rcServConfig.MapSecOptions = "P";
&rcServConfig.HandlerName = "";
&rcServConfig.InstanceLbl = "APPTEST_PGLT_SIGNIN";
&rcServConfig.UrlTarget = "RCF";
&rcServConfig.MenuOpt = "Y";
&rcServConfig.MainMenuOpt = "N";
&rcServConfig.nSeqNumMmnu = 0;
&rcServConfig.nSeqNumRmnu = 0;
&rcServConfig.PackageRoot = "";
&rcServConfig.QualifyPath = "";
&rcServConfig.AppClassId = "";
&rcServConfig.cInitMin = "N";
&rcServConfig.cEnable = "Y";
&rcServConfig.SrvcOpenOpt = "";
&rcServConfig.IsEmbeddable = "";
&rcServConfig.IsSingleUOW = "";
&rcServConfig.MasterTemplate = "";
&rcServConfig.AllowPersonalization = "Y";
&rcServConfig.CompEvent = "";
&rcServConfig.ProcessSeq = "";
&bRet = &rcServConfig.Save();

&rcMenuLayout = &rcServConfig.AddPageFieldMenu("", "");
&rcMenuFolder = &rcMenuLayout.AddFolder("Root", Value(&rcServConfig.SeqNum));
&rcMenuLink = &rcMenuFolder.AppendMenuLink(&rcServConfig.ServiceId, &rcServConfig.InstanceId);
&bRet = &rcMenuLayout.Save();

&rcServConfigClone = &rcServConfig.CloneForNewFull("APPTEST_PGLT_SIGNCLN", "APPTEST_PGLT_SIGN", &rcService, "", "", "Root");
/* Modify only those properties that are different from the source config. */
&rcServConfigClone.InstanceLbl = "APPTEST_PGLT_CLONE";
&rcServConfigClone.AllowPersonalization = "N";
&bRet = &rcServConfigClone.Save();

Syntax

Delete()

Description

Use the Delete method to delete this related content service configuration.

Parameters

None.

Returns

A boolean value: True if the delete is successful, False otherwise.

Example

import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;

Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig;

&rcService = create PTCS_SERVICE:RCService("EMPLOYEE", "QE_BOOK");
&rcService.MenuName = "QE_NUI";
&rcService.PnlGrpName = "QE_BOOK";
&rcService.ExpandFrame = "N";
&rcService.MinPagelets = 0;
&rcService.RcFrameLoc = "S";
&rcService.LanguageCd = "ENG";
&bRet = &rcService.Save();

&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
If (&rcServConfig <> Null) Then
   &rcServConfig.IsCompService = "C";
   &rcServConfig.PnlName = "";
   &rcServConfig.SeqNum = 0;
   &rcServConfig.HideFromSearch = "N";
   &rcServConfig.IsDefault = "N";
   &rcServConfig.MapSecOptions = "P";
   &rcServConfig.HandlerName = "";
   &rcServConfig.InstanceLbl = "APPTEST_TIL_SERVID";
   &rcServConfig.UrlTarget = "RCF";
   &rcServConfig.MenuOpt = "Y";
   &rcServConfig.MainMenuOpt = "N";
   &rcServConfig.nSeqNumMmnu = 0;
   &rcServConfig.nSeqNumRmnu = 0;
   &rcServConfig.PackageRoot = "";
   &rcServConfig.QualifyPath = "";
   &rcServConfig.AppClassId = "";
   &rcServConfig.cInitMin = "N";
   &rcServConfig.cEnable = "Y";
   &rcServConfig.SrvcOpenOpt = "";
   &rcServConfig.IsEmbeddable = "";
   &rcServConfig.IsSingleUOW = "";
   &rcServConfig.MasterTemplate = "";
   &rcServConfig.AllowPersonalization = "Y";
   &rcServConfig.CompEvent = "";
   &rcServConfig.CompRecEvent = "";
   &rcServConfig.ProcessSeq = "";
   &rcServConfig.cEnable = "Y";
End-If;
&bRet = &rcServConfig.Save();

If (&rcServConfig <> Null) Then
   &bRet = &rcServConfig.Delete();
End-If;

Syntax

DeleteMapField(n_index)

Description

Use the DeleteMapField method to delete the mapped page field from the related content service configuration.

Parameters

Field or Control

Definition

n_index

Specifies the mapped page field by index as a number value.

Returns

A boolean value: True if the delete is successful, False otherwise.

Example

In the following example, after execution of DeleteMapField, &rcMapFields is an invalid object:

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";
Local boolean &bRet = &rcMapFields.Save();
&bRet = &rcServConfig.Save();
&rcMenuLayout = &rcServConfig.AddPageFieldMenu("QE_BOOK.2", "0.QE_BOOK.QE_BOOK_NAME.2");

&bRet = &rcServConfig.DeleteMapField(1);
/* After execution of DeleteMapField, &rcMapFields is an invalid object. */
If (&bRet) Then
   /* do some processing */
   &bRet = &rcServConfig.Save();
End-If;

Syntax

GetMapField(n_index)

Description

Use the GetMapField method to return the mapped page field of the related content service configuration as a newly instantiated PTCS_SRVCONFIG:RCMapFields object.

Parameters

Field or Control

Definition

n_index

Specifies the mapped page field by index as a number value.

Returns

A PTCS_SRVCONFIG:RCMapFields object.

Example

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

Component PTCS_SERVICE:RCService &pgRFFlRcService;
Component PTCS_SRVCONFIG:RCMapFields &rcMapFields;

&pgRFFlRcService = create PTCS_SERVICE:RCService("EMPLOYEE", "QE_NUI_RI_GBL");
Local PTCS_SRVCONFIG:RCServiceConfig &rcRFFlServConfig = &pgRFFlRcService.AddNewService("APPTEST_UTIL_SERVID", 569863);
&rcMapFields = &rcRFFlServConfig.GetMapField(1);
If (&rcMapFields <> Null) Then
   /* do some processing */
End-If;

Syntax

GetMapFieldCount()

Description

Use the GetMapFieldCount method to return the number of mapped page fields for this related content service configuration as a number value.

Parameters

None.

Returns

A number value.

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";
Local boolean &bRet = &rcMapFields.Save();
&bRet = &rcServConfig.Save();
&rcMenuLayout = &rcServConfig.AddPageFieldMenu("QE_BOOK.2", "0.QE_BOOK.QE_BOOK_NAME.2");

Local number &rcMapFldCnt = &rcServConfig.GetMapFieldCount();
If (&rcMapFldCnt > 0) Then
   /* do some processing */
End-If;

Syntax

Save()

Description

Use the Save method to save changes to this related content service configuration into the database. Invoke the Save method after updating properties for the service configuration or after invoking any of these methods: AddPageFieldMenu, AppendMapField, CloneForNew, CloneForNewFull, or DeleteMapField.

Parameters

None.

Returns

A boolean value: True if the save is successful, False otherwise.

Example

import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;

Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig;

&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&rcServConfig.IsCompService = "P";
&rcServConfig.PnlName = "USER_ROLES";
&rcServConfig.SeqNum = 0;
&rcServConfig.IsDefault = "N";
&rcServConfig.MapSecOptions = "P";
&rcServConfig.InstanceLbl = "My Service";
&rcServConfig.MenuOpt = "N";
&rcServConfig.MainMenuOpt = "N";
&rcServConfig.cInitMin = "N";
&rcServConfig.cEnable = "Y";
&rcServConfig.IsEmbeddable = "";
&rcServConfig.IsSingleUOW = "";
&rcServConfig.MasterTemplate = "";
&rcServConfig.AllowPersonalization = "Y";
Local boolean &bRet = &rcServConfig.Save();