Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I create a validation on a select list or radio button item?

user1.0Nov 17 2021 — edited Nov 17 2021

UPDATE
I was able to get the validation to fire by moving the branch firing on the Next button from "After Submit" to "Processing". I think that makes logical sense.

I can't seem to get a validation to fire for a select list or radio button. I want to add a validation to require the user to select an option before continuing to the next step in my wizard.
See the setup below. The validation is being ignored when I click my Next button even if I don't change the values of my select list or radio button.
So far the only way I've gotten this to work is to create another hidden item to hold the value selected. Then create a dynamic action on the select list or radio button to set the selected value in the "hold" item. This seems like a lot of extra effort just to check the value of a list item.
Is it possible to create a validation on select lists and radio buttons?
DETAILS:
Apex 19.2
I have an item :P_SELECT_ITEM defined as a select list based on an LOV. The first record in the list is a control for a default value with a display of "Select a value" and a return value = -1.
Similar thing has been done with a radio button. There is a default option with a display of make a selection and a value of -1.
I have the Validation set like this:
Editable Region: -Select-
Type = Item != Value
Item = :P_SELECT_ITEM
Value = -1
Always Execute is selected (I tried it both selected and unselected)
Error Message: You must select a value
Display Location: Inline Field and in Notification
Associated Item: P_SELECT_ITEM
All other values for the validation are left to the defaults.
The Next button (because it's a wizard) is setup like this:
Behavior:
Action = Submit page
Execute validations is selected
Server Side condition:
Type: Inline Validation Errors NOT displayed
Branch Go to page 400:
Behavior...
Type = Page or URL (Redirect)
Target = Page 400
Server Side Condition...
When button pressed = P400_NEXT

This post has been answered by user1.0 on Nov 19 2021
Jump to Answer
Comments
Post Details
Added on Nov 17 2021
2 comments
847 views