Creating Display Control and Related Fields

This section discusses how to:

  • Use display control and related fields.

  • Create related edit fields.

  • Create invisible control fields.

A related display field is for display purposes only—it always references a row that’s not being updated from the current page. The display control and related display fields must both be at the same level. In the Work Location page, the Regulatory Region, Company, Business Unit, Department, and Location fields all show related display fields to their right. Search level fields, such as those shown above the Work Location group box, are display-only fields.

Image: Work Location page

This example illustrates the fields and controls on the Work Location page. You can find definitions for the fields and controls later on this page.

Work Location page

Because of the nature of control fields and related fields, PeopleSoft recommends that you:

  • Place them side-by-side on a page to indicate their relationship.

  • Provide adequate space between the fields.

  • Do not overlap them; otherwise, they appear skewed when viewed through the browser.

  • Change the label type for the related field to None so that it doesn't appear on the page.

  • Enter a text description to document the purpose of the field.

Note: The display control and related fields must be in the correct order on the order page. The display control field must be positioned before the associated related field; otherwise, a warning dialog box appears when you save the page. Also, fetching the related field after the control field is entered requires a transmission to the server at runtime.

Note: If you copy fields that have display control/related field associations configured from one page to another, the mappings between the related field and the control field will be lost. After copying these fields, you need to reset the control field/related field associations on the target page.

Related edit fields are slightly different from related display fields. Related edits enable users to enter descriptive values instead of code values and enable prompting on those descriptive values. Changing the value in the control field updates the related edit field, and changing the value in the related edit field updates the value in the control field. If appropriate, the control field can be display-only or even invisible to hide code values from the user.

At runtime, when a user edits a related edit field, it is treated as if the user changed the control field directly. Edits, including any assigned PeopleCode, are run on the control field. PeopleCode is not run for the related edit field.

The following partial screen shot is an example of a related edit field with a control field that is available for entry. When entering company information, the data-entry clerk may not have all company codes memorized, but instead knows just the name of the company. By entering the more descriptive company name in the Description field, (the related edit field) the company code (display control field) is automatically populated in the Company field.

If the user enters Payroll in the Description field and exits that field, the system searches for a match to this value and populates the field if only one is found. The field reads Payroll Services Technology. If more than one match is found, the field turns red, and an error message appears indicating that the user must use the lookup page to view all related values. Alternatively, the user could enter more detailed information in the field before clicking the prompt to further narrow the search.

Image: Related edit field

The following partial screen shot is an example of a related edit field with a control field that is available for an entry

Related edit field

At design time, you set up a related edit field in the same way that you create a related display field, except that you clear the Display Only check box in the Field Use Options group box so that the field is active at runtime. The control field's prompt table is used. You do not need to define a prompt table for the related edit field, just the control field. The related edit field must be a key or an alternate key in the prompt table. PeopleSoft recommends that the related values in your prompt table be unique so that there is a one-to-one mapping to the control values. This prevents the user from receiving a warning and having to access the prompt page to select the proper value.

In some instances, you may not want the control field to be apparent to the user. PeopleSoft Global Payroll, for example, relies heavily on PINs. While PINs are key values, and therefore very important for tracking and storing information in the database, you may not want to distract the user with such a number. However, you still want this data to be entered into the database with the transaction. Related edit fields are particularly helpful in these situations. You can associate the PIN field with a descriptive field and have only the descriptive, related edit field appear on your page. To do so, hide the control field using PeopleCode.

Note: If the hidden control field that you select is a required field, PeopleSoft Pure Internet Architecture changes the related edit field into a required field as well. At runtime, an asterisk appears next to the field label, marking the field as required. If the user does not enter information in the related edit field, the system displays an error message.

Your page design may require an invisible control field. For example, if users are interested only in the contents of the related display field, then make the control field invisible. Unlike visible control fields, you can overlap an invisible control field and its related display field.

Note: If you specify a field as invisible in PeopleSoft Application Designer, you cannot make it visible using the UnHide property in PeopleCode.

To add an invisible control field with a visible label:

  1. Access the properties dialog box for the invisible control for which you want the label to appear.

  2. Select the Use tab.

  3. Set the appropriate field use options:

    1. Select Display Only, Invisible, and Show Label to make the field invisible and its label visible.

      Important! The Show Label option is not supported for page controls on fluid pages.

    2. Select Display Control Field.

  4. Select OK.

  5. Add an edit box to your page.

    Place this edit box directly to the right of the display control field that you just set.

  6. Access the properties dialog box for the new edit box.

  7. Select the Use tab.

  8. Select Related Field.

  9. Select the appropriate control field from the Related Control Field drop-down list box.

  10. Select OK.