mre
mre

Reputation: 137

Oracle Apex PL/SQL Function - If all are empty then

I have a big amount of page items in a Oracle Apex 19 page.

If all of those page items are empty, there should be an error. However, if just one of them is not empty, there should be no error.

I could just create a large if statement, but is there a elegant way to solve this using a PL/SQL function body validation?

Upvotes: 1

Views: 585

Answers (1)

sim0n
sim0n

Reputation: 161

you could check your items using coalesce:

  return coalesce(:P100_DEMO_ITEM1,:P100_DEMO_ITEM2,:P100_DEMO_ITEM3) IS NOT NULL;

Upvotes: 3

Related Questions