Reputation: 83
In an Apex 4.1.1 application I have a form on an "Entries" table that also uses codes from a separate "Reason_Codes" table. When my users are entering data on the form, the Reason Code field is text with autocomplete; this would allow the user to select from existing codes or to declare a new value if it does not yet exist on the table.
The value in this field can easily be entered on a new line on the "Entries" table, but the new reason code must also simultaneously be entered on the "Reason_Codes" table as a new value so it can then be used in the future. I have created a page process to INSERT this value on the proper table after clicking a submit button, only if it meets the condition that this value does not already exist on the table. Thus, I made the condition expression as follows (condition type is NOT Exists):
SELECT 1 FROM REASON_CODES
WHERE UPPER(NAME) = UPPER(:p49_RC)
When I run the page to test this, the value is not inserted. I tested the INSERT function with a simpler condition expression (and with the process point being On Load, condition type "Exists"):
SELECT 1 FROM dual
WHERE :P49_RC is not null
The insert functions as written in this simple case.
What might I be missing here?
Upvotes: 0
Views: 359
Reputation: 1625
If the process runs when you put it as On Load but not as On Submit check for a Branch or redirect that forces the On Submit procedure to be spiked.
Other things that you can try is to remove the condition and see if it executes without it and remove any other process.
Upvotes: 1