psxlatitem in peoplesoft

psxlatitem in peoplesoft

psxlatitem in peoplesoft is a table for store value of translate value of the field.  psxlatitem has related language record is PSXLATITEMLANG and parent record is PSXLATDEFN.

You can select a value of translate value by using below code of PeopleCode.

SELECT XLATLONGNAME FROM PSXLATITEM WHERE FIELDNAME =’TYPE’ AND FIELDVALUE= ‘1’;

SELECT XLATLONGNAME FROM PSXLATITEMLANG WHERE FIELDNAME =’TYPE’ AND FIELDVALUE= ‘1’;

Using the Translate Table

This section provides an overview of the Translate table and discusses how to:

  • Add values to the Translate table.

  • Change translate values.

  • Delete translate values.

  • Save the Translate table.

Understanding the Translate Table

  • Field type is Character.
  • Field length is 1 to 4 characters.
  • Field values consist of a relatively small, static set of values that are not maintained by the user.
  • No other fields relate to this field.

 

Reference: https://docs.oracle.com/cd/E57990_01/pt853pbh2/eng/pt/tapd/task_UsingtheTranslateTable-077674.html#topofpage

How to use a single quote in PeopleCode

How to use a single quote in PeopleCode

How to use a single quote in PeopleCode. You can use a function of PeopleCode is Quote() and using “‘”

For Example 1 : &WHERE= ” Where emplid = “| “‘” | &emplid | “‘” | ;

For Example 2 : &WHERE= ” Where emplid = “| Quote(&emplid);

How to use substring in PeopleCode

How to use substring in PeopleCode

How to use substring in PeopleCode of each requirement. I have requirement select data from a parameter in a page that contains EMPLID, RC code and year. After user input parameter then retrieves data in grid or scroll area. I using this below PeopleCode.

If %page =’PAGE_NAME’ then

if all(recordname.emplid) then
&wheretxt = &wheretxt | “and emplid = ” | Quote(recordname.emplid);
end-if;

if all(recordname.RC_CODE) then
&wheretxt = &wheretxt | “and RC_CODE= ” | Quote(recordname.RC_CODE);
end-if;

if all(recordname.YEAR) then
&wheretxt = &wheretxt | “and YEAR= ” | Quote(recordname.YEAR);
end-if;

if all(&wheretxt ) then
&wheretxt = Substring(&wheretxt, 4, Len(&wheretxt));
&wheretxt = ” where ” | &wheretxt;
rem WinMessage(&wheretxt, 1);
end-if;

ScrollFlush(Record.recordname);
ScrollSelect(1, Scroll.recordname, Record.recordname, &wheretxt);
SortScroll(1, Record.recordname, recordname.EMPLID, “A”);

end-if;