How to change label record by PeopleCode

You can use this PeopleCode to change the label name by condition.

Example 1:

RecordName.FieldeName.Label = ‘Label Name’;

  • Change label from message catoloag

Example 2:

SQLExec(“SELECT message_text FROM PSMSGCATLANG WHERE message_set_nbr =’10003′ AND message_nbr =’13′”, &Txt_Lable);

RecordName.FieldeName.Label =&Txt_Lable;

Example 3:

&Cnt =1;

If &Cnt > o then

SQLExec(“SELECT message_text FROM PSMSGCATLANG WHERE message_set_nbr =’10003′ AND message_nbr =’13′”, &Txt_Lable1);

RecordName.FieldeName.Label =&Txt_Lable1;

else

SQLExec(“SELECT message_text FROM PSMSGCATLANG WHERE message_set_nbr =’1000′ AND message_nbr =’3′”, &Txt_Lable2);

RecordName.FieldeName.Label =&Txt_Lable2;

end-if;

How to change group box label by PeopleCode

Change group box label using PeopleCode

You can change the group box label by PeopleCode.

GetPageField(%Page, “YOURGROUPBOXFIELDNAME”).Label = “Label your grid”;

The above coding has many advantages: Can increase the number of characters more than the system specified on the group box on page PeopleSoft.