Oracle apex - item value doe not sent on submit - oracle

I have an item :P3015_VOL (NUMBER field), when I click "save" button I'm doing two things:
Dynamic action that sets the item value to 33. Then in debug message I can see that the item does have the value 33.
in the submit page processing I print again the item's value in debug message:
Now the Value is NULL
Why is this happening? How can I get the correct value in the processing?
Thanks

If an item value is calculated on page submit, the best way to do this is to submit the page and perform a computation on submit. There should not be any need for a dynamic action here.
Steps:
Create a Computation on P3015_VOL with point After Submit, type Static Value, value 33
Set the SAVE button action to Submit Page

Related

Item becomes null after submitting page in Oracle APEX

I'm currently using Oracle APEX. I have this validation that executes error message whenever an item is null. And I have created a dynamic action when losing focus, it formats into a currency format.
I have this problem whenever I submit the page, my item becomes null / my validation executes.
My assumption is that validation comes first before the dynamic action.
Validation
Item is not null
Dynamic Action
Lose Focus
Action
Execute PLSQL that formats to a currency value.
Scenario:
Fills-up an item
Click submit button ahead
Expected Result:
Empty validation should not trigger when page is submitted.
Actual Result:
Empty validation is triggering when page is submitted.
Try this set you offending validation to never and make sure the dynamic action is doing what you want. Oracle in general is klugy with number formatting.

How to display item value as a &Item. without refresh?

I am trying to display a value of an item like that:
Some text &P5_ITEM.
It's works only when I refresh a page, without refreshing I can only see a previous value of an item.
I tried to submit a item value with dummy pl/sql
null;
Items to Submit &P5_ITEM.
but it didn't work
It's work only with a javacript
Location.reload()
But it is not a solution becouse it invokes reload after reload since dynamic action starts when page load.
I figure out how to fix that, instead of calculating value of an item in dynamic action fired when page load I passed value of the item in link attributies and it's working properly.

Oracle apex value of item is not up-to-date in button link builder when using redirect to another page

I have a value of a field on page 1 that I need to pass to page 2 (modal dialog).
The field is changed on page 1. and I can see it's got updated on the page and when I print its value in debug messages.
When I'm clicking the button, with the action "Redirect to Page in application", the value on page 2 is the initial value of the field, and not the updated one, is this a bug?
what can I do?
I don't want to use dynamic action or things like "prepare_url" because of many reasons.
Thanks.
That is not how a link works. What you are seeing is not a bug, it is expected behaviour. The link is rendered when the page is rendered and will have the item values at render time and a calculated checksum (depends on settings) based on those values. It will not pick up any changes.
The "traditional" way to do this is the following. Assumptions: Need to navigate from page 1 to page 2 and set P2_ITEM on page 2 to value of P1_ITEM on page 1.
Create button (let's say button name is MYBUTTON) of type "Submit Page"
Under "Processing", create a branch to page 2.
For "Page or URL" pick page 2 and set P2_ITEM to value P1_ITEM.
For "Process point" pick "After Submit"
Under "Server Side Condition", select "MYBUTTON" under "When Button Pressed".
Since this is a branch your page has been submitted and all the changes you made to P1_ITEM will be picked up. The fact that page 2 is modal does not affect this, APEX will take care of that for you.
As an alternative to Koen Lostries excellent explanation, in some cases it is also possible to have the target page load the item from the source page.
Ensure that the item is being pushed to the session, for example by using a dynamic action with the items to submit option, but do nothing else in this dynamic action.
Then, when page 2 opens, simply add a pre-header-process, that makes something like :P2_ITEM := :P1_ITEM;
In my experience this approach is easier than doing a redirect in a dynamic action, as there is no declarative option for that and you often need hand-written javascript to do that.

I cannot pass a value on button click in oracle apex 19.2

I have a wizard and i am trying to pass a value from one page to the next onclick a next button on the wizard in oracle apex but when i click next the value is not going through to the other side.
enter image description here
Image above shows the next button and the how i am trying to pass the value
thanks
What you did is this:
there's page 33
there are (at least) two items on that page
P33_ID
P33_NEW
you are passing P33_NEW item's value into P33_ID item
in other words, you're doing it on the same page, while it seems - according to what you said ("I am trying to pass a value from one page to the next") - that you're expecting something to happen on some other page
If that's so, transfer P33_NEW item value to "some other page", not page 33.
If you still want to do it on the same page, consider using a Set value dynamic action.

How to submit the value in an inputtext field by setting autoSubmit to false

I have an ADF form based on a VO and I need to check whether a particular field is null or not on click of a Submit button. For this, i set autoSubmit to true and get the value entered to a variable in my bean.On click of Submit button , i check if the variable is null or not and display error faces message if the variable is null. But how do i get the value entered in the form to a variable in the bean with autoSubmit set to false?
Why do you have it turned on in the first place? And why do you want to turn it off? Are you clear on it's functioning and why to use it?
Autosubmit is used to support Partial-Page Refresh.
If you don't need PPR, Just turn it off. The value will still be available once the submit button is pressed. Read about it here.
An input component that has its autosubmit property set to true also
performs a partial submit of the form. However, this time it doesn't
submit the entire form but only the component that triggers the submit
plus components referenced it in their PartialTriggers property.
Autosubmit is not required to access values entered into input components on the screen. Autosubmit submits only the field and also bypasses certain phases of the page processing lifecycle.
if you turn autosubmit off, the entire page - all the fields - is submitted and goes through the complete page processing lifecycle, so you have access to all input fields.
Docs here.

Resources