0
votes

I want to set an item value with a dynamic action located on a button. After displaying a dialog page in the "DialogClose"-Action I do a "SetValue" and "SubmitPage" in the True-branch of the action.

Problem is: the item is set but not submitted. Reloading displays the original value. Have tried the solution showed here, but it didn't solve it for me: Apex 5 : Dynamic action set page item value

Next I was suspecting that the problem is that the region is being set to "read only" on page load. But I tried with the region not being set to read only - problem stayed the same.

Update: double checked on the "read only"-region: it does make a difference. Unsetting "read only" made id work. Seems I was a bit confused while testing ...

Here's how the dynamic action looks like:

Display of the dynamic action

The set-value part looks like this:

Display of the set-value part

And here's the submit action:

Display of the submit action

Any ideas? Thanks!

2
Why did you select "PL/SQL Expression" for your Set Value type? What makes you think the value isn't submitted? Given your reply to the answer below, it seems you have a form page that's refetching the value from a table. Is that not the case?Dan McGhan
Oh, did some experimenting there - set it to "PL/SQL Expression because of what I read there stackoverflow.com/questions/29756037/… but that one didn't help. I started of with "static". What makes me think it's not submitted? Because the value on the table is not changing.sers
I see. Given your logic, static is fine. As for the submit, your action doesn't specify a Request/Button Name. Try setting that to CREATE or SAVE.Dan McGhan

2 Answers

0
votes

My first guess is that your item P11_GUT_LIZ has a "Source" attribute with setting "used" at "Always, replacing any existing value in session state"

Screenshot of the "Source" attribute region for page item

If this is not the case, I suggest you add an "After submit" process for debugging in the processing tab, showing you the value after page submit:

raise_application_error (-20001,'The value of P11_GUT_LIZ is: '||: P11_GUT_LIZ);
0
votes

As written in the update to the question, problem was that the region was read-only. So the idea of setting a value and submitting it was probably flawed from the beginning. But the region has to stay read-only.

So my solution to circumvent this was to set that value inside of an automomous transaction by calling a pl/sql procedure.

Thanks for all the valueable input!