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;