I have an interactive report, page 4, which displays a list of projects. Each row that is displayed has a check box. When I select the check box for a specific row, I want to go to page 10 which displays a list of documents which can be allocated to the project. To do this, I need to pass the project_id, from the projects page to the documents page.
I have created P10_PROJECT_ID on page 10 to receive the project if
I have created a submit button to be clicked once a project has been selected. In the page button processing I have set up the 'Action when button is clicked' as
Action: Redirect to Page in this application
Page: 10
Set these items: P10_PROJECT_ID
with these values: &PROJECT_ID.
However the project id is not being passed from page 4 to page 10. If I change &PROJECT_ID. to the value 101, the value is passed
Please can someone help explain where I have gone wrong when trying to pass the variable for project id?
Thanks
Tracey
If I understand the question, you need pass 1 project_id.
In region source of your report change your select like:
SELECT name, description,
'display DOC' link
FROM your_table
you will get link to 10 page in your report (id value transmits to P10_PROJECT_ID)
Related
In page 1 I have a region which has many page items.
On entering the values in these page items and on click of submit,
I need to get redirected to page 2 and display all the values on the page(Please note that I will not be having any pageitems in the page 2)
How can I use a procedure in page 2 and get all the values from page1.
PS: My region is as below.
enter image description here
and i want my output to be as below
enter image description here
In APEX you would do this using a branch. A branch is executed after the processing and is used to (conditionally) redirect to another page. If the target of the branch is another page in the same app there is the option to set the page items on the target page with page item values of the current page.
In your case, I'd create the same page items on page 2 and then set the values in the branch. For example if you have P1_RELEASE_DEPENDENCY on page 1 then create a P2_RELEASE_DEPENDENCY on page 2 and set the value in the branch. Same for any other page items.
Suppose you have a region with static content on page 2 to display the values that were passed in the branch, then you could use the following source
My release dependency is &P1_RELEASE_DEPENDENCY.
The "&<PAGE_ITEM>." notation can be used in html only, not in pl/sql.
This is the clean way of handling this functionality. You currently don't have page items on page 2 but I would add those, just for displaying the values.
There is a problem transferring values between pages in the application. I have 2 pages on the first page there is a variable P9_ITEMID (when you run page 9, in this variable SQL Statement query writes the data). There is a second page 181. I want to move data from variable P9_ITEMID to variable P181_ITEM. To do this, I use the 'redirect to page in this application' option. But it doesn't work. Although I see in the variable P9_ITEMID there is data. But when you go to page 181 but P181_ITEM is empty. I would be grateful for help))
P9_ITEMID is a virtual variable that is not assigned to any column in the table. This mmin simply displays data. When I start the page, I see the data that was written to it due to the dynamic action
also i tried to write the value in P9 ITEMID this way
My code:
declare
v_empname items.id%type;
begin
select id into v_empname
from items where id = :P9_ITEMID;
apex_util.set_session_state('P9_ITEM_ID', v_empname);
exception
when others then
apex_util.set_session_state('P9_ITEM_ID', null);
end;
I'm assuming that you have created a button with action: 'redirect to page in this application' and you want the session value of a page item to be passed to the target page.
When an url is constructed using link builder, the link is built at page rendering time. It does not pick up any changes in session. Even when you set the session state in a dynamic action, it will not pick it up because the url is already rendered.
To pick up any changes on that page, it is necessary that the page item value is set in session state and this is done by the "page processing".So if you use "Submit Page" on the button and create a branch to redirect to the page it will behave the way you want.
I am using Oracle Apex v21.1. I have an Interactive Grid on a Modal Dialog Page which gives me the logs of the modifications made on a certain item.
Here's the scenario :
Select the item on the list Step 1
The details page of the item opens
Click on the "Logs" button Step 2 & 3
The "Logs" button open another Modal Dialog Page which displays an interactive grid Step 4
The "Logs" button set the value of the primary key to the interactive grid, so the list is filtered to show the information of this particular item. Step 5
Everything works fine, but when I try to apply a filter, sort or search, the interactive grid refresh, shows no data, and a blank column appears. If I close the list but reopen it again, the results are appearing, based on the filter, sort or search.
What could be the reason behind this problem ?
Here's the code of my Interactive Grid
SELECT * FROM inv_tb_item_logs
WHERE pk_article = :P24_PK_ARTICLE; --pk_article is my primary key
You can see more details on the screenshots
Thank you in advance,
Thomas
Based on Koen Lostrie's answers, here's how to fix it :
Create an Hidden Item to retrieve the ID of the Item later on the Logs List page Step 1
In the Behaviour of the Logs button, set the value of the hidden item to the value of the ID of the Item Step 2
Change the WHERE clause to WHERE id_item = :P25_PK_ARTICLE
In the Page Item to Submit attribute, select P25_PK_ARTICLE
I had to create this specific hidden item because i couldn't select the P24_PK_ARTICLE item to submit since it was on another page.
I hope this could help other people, thanks again for your answer Koen !
Not sure what am I doing wrong and need help to diagnose the issue.
I have an apex page with an IG on it with radiobutton selection column, allowing the user to select only one row at a time.
On row select I use javascript to grab the ID of the selected row and then use Execute PL/SQL
NULL;
in order to store the value into the session state of P2_ID.
I also have a button on the page that has another page as a target - page 3, and I need to get my P2_ID value to that page.
So I set the page item of a target page - P3_ID ro &P2_ID. in a Link Builder - target pop up window. Along with that I pass another page item P2_TEST, which has a static value.
Now when I get to page 3, I do not see P3_ID in the session state while I do see P3_TEST and it does have a value, but P3_ID is not even listed... What am I doing wrong here?
How about this: instead of executing NULL; when pushing the button, SUBMIT (submit will certainly store values into session state). Create a branch which takes you to page 3; among branch properties, you'll find an option to set P3_ID to P2_ID
Need a help in understand underline logic here. I have created a simple APEX application. First page shows the table details and via a "Create" button "Interactive Search" region, directs to a form page. Now form page consists of "Save" and "Insert" buttons in correct regions. So whole app works. When I press "Create" from 1st page to 2nd, "Save" button is invisible and when I click the edit icon on the table of 1st page, "Create" button is invisible in 2nd. App works accordingly, but could not figure out what setting enable this set-up even though I was able to make it work.
1st Page : Interactive Report Page. 2nd Page : DML Form. Built the app from blank pages.
Could any of you explain how it works?
When you click the Create button on the Interactive Report page, it takes you to the Form page in insert mode, i.e. it allows you to enter a new row into the table. Therefore, the Form page has the Create (and the Cancel) button.
On the other hand, when you click the Edit button on the Interactive Report, it takes you to the same Form page, but this time in edit mode which enables you to modify values (and save those changes with the Apply Changes / Save button), delete that row using the Delete button, or - as previously Cancel current operation.
If you look at Form page's buttons' properties, you'll see that they have Server-side Conditions set which are then used to render (or not) a certain button. For example, if the Form page number is 13 and the primary key column is set to the ID column, then these conditions look like this:
Create: P13_ID IS NULL (i.e. the primary key column value doesn't exist yet, which means that this is a brand new row)
Apply Chanages / Save: P13_ID IS NOT NULL (i.e. the primary key column value exists, which means that row you see was fetched from the database)
Delete: P13_ID IS NOT NULL (the same condition as for the Apply Chanages / Save button)
Cancel: it is always displayed.