Using the Field Object Style Property
In PeopleSoft Application Designer, on the Use tab of the page definition properties, you can associate a page with a style sheet component.
The style sheet has several classes of styles defined for it. You can edit each style class to change the font, the color, the background, and so on. Then, you can dynamically change the style of a field using the Style field class property. The style sheet does not change, only the style class associated with that field changes.
The following example changes the style class of a field depending on a value entered by the user. This code is in the FieldChange event.
Local Field &field;
&field = GetField();
If TESTFIELD1 = 1 Then;
&field.Style = "PSHYPERLINK";
End-If;
If TESTFIELD1 = 2 Then;
&field.Style = "PSIMAGE";
End-If;
The following examples show the fields with different styles:
The below mentioned is an image of a field with PSIMAGE style.