Last updated on SEPTEMBER 05, 2017
Applies to:PeopleSoft Enterprise PT PeopleTools - Version 8.55 and later
Information in this document applies to any platform.
Both SetCursorPos PeopleCode built-in function, as well as field class method SetCursorPos are not setting the focus on fields sitting on grids with more than one tab.
No error message is given to the user.
The error is verified on PT 8.55.16, but can be verified in previous patches and releases of tools.
The issue can be verified by following the steps:
- Open a page that contains a grid with editable fields in a tab other than the first tab.
- One of the fields can be left blank at save time.
- add a button at level0 of the page if none exists.
- add PeopleCode on FieldEdit or FieldChange of the button to issue a message and set the cursor to the field in a particular line
- e.g.: loop through the grid lines
- if the field is blank, issue message
- set the cursor to the field in the grid
- In PIA, access the page and enter data, so that fields in the second tab of the grid are left blank
- the field should be one of the fields that will be validated when clicking on the button.
- Re-open the component in PIA. Make sure the grid shows the first tab.
- Click on the button.
- FieldEdit or FieldChange, according to your code will fire.
- The cursor is not set to the field in the grid.
Please refer to Replication Instructions for more details on how to replicate the issue.
Users will see an error message, but will not be directed to the offending field on the grid.
Customer use case:
We have a custom form for users to request item, add or update.
The form has 2 tabs – Item Details and More Info.
We have written PeopleCode to validate and throw error if some of the fields are blank.
Those fields CAN be initially saved as blank. They are not mandatory on the form. Users are allowed to leave them blank at that point of the business process.
This is a request form. Those fields are required at the time of submission of the form, which is done by clicking on a submit button.
By clicking on SUBMIT, PeopleCode fires to validate fields. If the offending field sits on second tab of the grid, SetCursorPos should set focus to that field and then an error message would be given to the user.
Problem is, SetCursorPos is not setting the focus to the field. Rather, the system stays in the first tab (Item Details) and doesn’t automatically navigate to the second tab (More Info) to set the cursor on the error field.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms