I have breadcrumb on page n°3 described as below:
Home >> Page 1 >> Page 2 >> Page 3
I have P03_ID_CLIENT item in Page 3 and P02_ID_CLIENT in the Page 2
My question is: When I click on Page 2 in the Breadcrumb, How can I affect the value of P03_ID_CLIENT item to P02_ID_CLIENT in the Page 2
I tried with Branches but it seems that I had to trigger an action to set the value of the item in the target page
I think the mention of breadcrumbs is superfluous. Are you requiring a Computation on Before Regions to set P03_ID_CLIENT to the value stored in P0_ID_CLIENT?
Related
This is my issue: I have a text field item in a normal page (P7_PRODUCT), in this page there is a button that opens a modal page and, in the modal page there is another text field item (P7_PRODUCT). I would like that when I write a product in P7_PRODUCT, the same product appears in P8_PRODUCT. I tried with several dynamic actions, but none of them worked.
Here's one option.
on page 7, there are: P7_PRODUCT text item and P7_GOTO_8 button
let button Submit the page
create branch
name it e.g. "Goto 8"
it should redirect to page 8
in "Link Builder", set P8_PRODUCT item to &P7_PRODUCT. (note leading ampersand and trailing dot)
run page 7
enter something into the P7_PRODUCT item
press the button
modal dialog page opens and its P8_PRODUCT contains value you entered on page 7
A good blog to read is this one, by John Snyders from the apex development team. As he explains, it's not advised to branch to a modal dialog - instead you should link to it.
Here is an example based on techniques described in [this] (https://jeffkemponoracle.com/2022/02/reusable-region-as-a-modal-page/) blog.
I have 2 pages: Page 108 (normal page) and page 109 (modal page). Page 108 has a region (Region 1) with page item P108_NEW and a button called TO_MODAL. Page 109 has page item P109_NEW. When a user enters a value in P108_NEW and clicks the button, page 109 should open with the value from P108_NEW shown in P109_NEW.
The technique generates the url of the modal page and then redirects to it.
Give the region on page 108 a static id: "region1". This is used if you want to create a dynamic action on close of the dialog.
Create a new hidden item on page 108 (P108_URL_TO_MODAL1) to hold the value of the modal page url. Source type: Expression, source:
apex_page.get_url(
p_page => 109,
p_triggering_element => '$(''#region1'')'
)
Make sure to set "Used" to "Always, replacing any existing value in session state".
Create a dynamic action on click of button on page 108.
Add an action to the dynamic action of type pl/sql to set the value on page 109.
Action 1: Execute Server-side Code, Pl/SQL Code:
:P109_NEW := :P108_NEW;
Values to submit: P108_NEW
Action 2: Execute Javascript code:
apex.navigation.redirect("&P108_URL_TO_MODAL1.");
This should be it.
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 have two form pages 3 and 4. I want to pass the value for item: P3_LOT_N in page 3 to item: P4_LOT_N in page 4 when the button "Next" is pressed. How can I do this in oracle apex 5.0? Please help. Thank you.
Here's how:
open NEXT button's properties
under "Behavior", set "Action" property to "Redirect to page in this application"
click the button next to the "Target" (currently, it says "No link defined")
in a modal window that opens, target page will be Page 4
in "Set items" section, set "Name - value" pair (i.e. set P4_LOT_N to accept P3_LOT_N value)
That should be all.
If you do this via a "Redirect to page in this application", then the other form values you have on page 3 will not be POSTed to session state.
There are at least a couple other ways you could accomplish this:
You could simply have the Source of item P4_LOT_N be P3_LOT_N.
You could define a computation on page 3, to set P4_LOT_N to P3_LOT_N.
I am trying to figure out if it is possible to use a special field in a parameter. I am working on a set of reports that will be printed and mailed out. The print shop wants to be able to separate them into all 1 page reports, all 2 page reports, all 3 page reports and so on. I have set up the Page N of M to reset page number after and new page after the appropriate footer. So is it possible to use Page N of M in a parameter so you can select all the 1 page reports or all the 2 page reports and so on?
DB oracle: 11g
APex 4.2.6.00.03
I Have a Select list with page names displayed and page number as the value.
so for example
displayed: reports/
value: 15
displayed: Config/
value: 18
displayed: home/
value: 1
I also have a Dynamic action which sets the page number from the select list. Once a button is press
and also placed in Page items to submit
SELECT page FROM getPage
where Var = :P10_Page
How do I do a page redirect from the page number from above. Im stumpped.
Many thanks
If your select list returns the actual page numbers you want this is simple. Just edit the select list item and set the Page Action when Value Changed setting to "Redirect to Page (based on selected value)":
See my demo on apex.oracle.com.
You seem to have the select list returning one number which you then look up in a table to get a different number. I don't understand why that would be necessary?