Skip to Main Content
Feature Request FR-2747
Product Area Page Components
Status CLOSED

6 Voters

Declarative Warning Messages

bshumway Public
· Sep 14 2022

Idea Summary
This is a new section that would fire after the “Validations” section but before the ”Processing" section.

The “Warning” component would look very similar to the “Validations” component. However when a “Warning” is TRUE the user is given a warning message. By default the user will be able to choose between two buttons, “Cancel” or “Continue”… but we as APEX Developers would have declarative access to to rename the buttons ourselves.

Use Case
Many times we don't want a validation to fail, but we do want the users to be aware they are about to do something ‘risky’ or ‘counter-intuitive’. Currently we can reproduce this by having a DA on click of the submit button and a “Confirm” DA fires…. followed by a “Submit” DA if the user clicks “OK”.

However, this approach has a few different drawbacks.

#1: If you have several different buttons on the screen capable of submitting the page… it gets cumbersome having to create a new DA for each button just to show this warning message

#2: The warning message would have to fire conditionally based on the client-side condition… which is often JavaScript condition… and APEX developers are less verse in JavaScript than in PL/SQL (I know we like to pretend they are equally competent in both languages, but really PL/SQL is King in the APEX world)

#3: You can't rename the “OK” button (at least as of APEX 20.2 which I'm using)

Preferred Solution (Optional)
Declarative warning messages come to the rescue. They not only make the problem easier, but encourage APEX developers who “never even thought about warning the end user” to start adding warnings to their apps. I think this is a no-brainer.

I also think it would be smoother to have the warning messages fire after the validations (instead of before)

This idea has been closed due to the lack of community activity during the period since it was submitted.

Comments

Comments

  • bshumway OP 2 years ago

    I'm surprised this got closed.

  • vincent morneau Admin OP 2 years ago

    Hi Ben,

    I can see the value of this idea, although I'm pretty neutral about it given that developers can still make it work using DAs today. We decided to let it open to see people's interest, and then it was closed because it didn't meet the activity threshold.

    To your points:

    #1 It would be nice if a DA could fire based on multiple events. jQuery selector would work here, but I understand it's not declarative. We have plans around a revamped actions interface that would make this easier.

    #2 We do have a number of client side declarative conditions. Can you think of others that we could add?

    #3: You can rename the OK button by overriding the APEX.DIALOG.OK text message.

  • bshumway OP 2 years ago

    Hi Vincent! Gosh it's been a while.

    Thank you for taking time out of your day to get back to me. I respect your decision :). 

    “We have plans around a revamped actions interface that would make this easier” - cool!

  • kcannell-2 OP 1.2 years ago

    Just seeing this - and this is defintely a worthy idea.

    Consider the often there are different message levels - Informational, Warning and Error - just like Alerts.  It would be awesoem to have Validations honor those same tiers.