Using the ImageReference Field

To associate an image definition with a field at runtime, the field has to be of type ImageReference. An example of this is referencing a red, yellow, or green light on a page, depending on the context.

To change the image value of an ImageReference field:

  1. Create a field of type ImageReference.

  2. Create the images you want to use.

    These images must be saved in PeopleSoft Application Designer as image definitions.

  3. Add the field to a record that will be accessed by the page.

  4. Add an image control to the page and associate the image control with the ImageReference field.

  5. Assign the field value.

    Use the keyword Image to assign a value to the field. For example:

    Local Record &MyRec; 
    Global Number &MyResult; 
     
    &MyRec = GetRecord(); 
    If &MyResult Then 
       &MyRec.MyImageField.Value = Image.THUMBSUP; 
    Else 
       &MyRec.MyImageField.Value = Image.THUMBSDOWN; 
    End-If;