I wanted to create a copy button in a form but this button needs to work using an sql statement which will be like
select name, address1, address2, zipcode, car_type, model from Users WHERE report_id=:report_id
I will explain more into this with an example.
If on a report I have a list of users and when you click on one of the user, it will take you to a form. In this form you can exit and
save it, where the
save button is, they will be another button called
copy, this button will use the
sql above and will copy
SOME information on the form based on the
report_id(the current report being viewed/edit in the form.)
copy button will redirect to a form page and will render the information it goes from that sql statement.
I want to use sql statement because in
action when button clicked
with these values it says that colons, commas show not be in those values for example address_1, car_type, and other datatype contents those and because of this, I do want to do it this way. I did try it but I kept getting a
404 error page thats why I want to try the sql way.
How will I be able to do it this way please?
EDITTED TO ADD link to image `FOR MY IDEA IN WHICH I THINK MIGHT SOLVE THIS PROBLEM`
the image ABOVE shows my
COPY button. as you can see I item and values is the
The image above shows the
PROCESSES in which the sql query is run and
condition it is the copy
The way i think this will work is that when you click on the copy button, the sql query will run and use the current
order_id on the
form to get all the information in the sql and show it on the form field.
I have a feeling this might work unfortunately because of my limited knowlegde with apex, what I have try doesn't work. Am I missing something?
I saw the images which you uploaded. From which page you are redirecting to Page#3??? Tell me about the page#3 and page#2 whether its a form or report. your computation (as per 2nd image) exists in which page?? where clause in your query in computation using an item (:rec_id) is it exists in your page?? Plz give me these details so that i can help you.
Hi vdsadhi, first of all thanks for your interest in this question. page 2 is a report and page 3 is a form. its not meant to be :red_id, its meant to be : p3_report_id.
The general idea of this is that in the first link image, I have the `order_id` and in the processes, which i named `getdetails` i have in the sources a similar sql in the question. In the condition I have set it to the `copy` button.
In my report I have about 5000 reports, lets says you clicked on report 3478, it will take you to the form in which you can edit and save it or Copy that report. When you click on copy, it should redirect to the form page BUT without the report it. In the form page which you are redirect it, the sql above should find the information based on the previous form you copied from. (Hope I am making sense so far).
for the form to know what copy, it will run the sql and select it based on the previous form for example 3478. this is why i used the : p2_report_id.
so the full sql should like something like this if i was to copy from the report 3278
select name, address1, address2, zipcode, car_type, model INTO
PLEASE NOTE: That the
report_id is not always going to be 3278.
I hope this makes sense, btw I am not using any computation
Confused.. Are you using 3 pages or you are redirect to the same page (Page#3) when you click on 'Copy' button???
If possible, Can you create an example in http://www.apex.oracle.com and share your credential???
dont be confused. Forget about page 1 because its just a BLANK PAGE. page 2 is the report and page 3 is the form. Because page 3 is a form, i didnt see the point in creating a new form just to copy the information to it so I thought I might aswell redirect back to the same form.
Have you created an example in http://www.apex.oracle.com??
create a sample user and give only developer access and then share that sample user credential here (workspace, username, password).
Please follow the below steps once you logged into apex.oracle.com
1.Go to Administration > Manage Users and Groups.
2.Click on 'Create User' button.
3.Give values to mandatory fields.
4.Under Account Privileges section, select yes or no like below
User is a workspace administrator: No
User is a developer: Yes
5.Enter password and then click on 'Create' button to create user.
after creating the user, share the username and password which you gave for that user and your workspace name.
Hi again sorry for the late reply... below are the information you needed
Application name is: copy_button