user9038848
user9038848

Reputation: 17

Oracle Apex 19 - Dynamic Actions - How can I set a Date Picker application item with sysdate by default by change action?

In Oracle Apex 19.2 I'm using dynamic actions on an item STATE that needs a the DATE Date Picker value set to sysdate only when STATE=2.

How can I set an application item with sysdate in the format 'dd/mm/yyyy' by default by the change action?

Upvotes: 0

Views: 1063

Answers (1)

user9038848
user9038848

Reputation: 17

I solved setting a CHANGE dynamic action on the item STATE with both Set Value and Clear action. Setting value with a PL/SQL function body like this

return to_char(sysdate, 'dd/mm/yyyy');

Affected item is DATE. Escape Special Caracters avoids slash errors at runtime.

Upvotes: 0

Related Questions