Popup passing return multiple values
I have a form where the user can enter a street address information using 6 different areas (Street, city, postal Code,...) but I want the user to be able to click a button in this region which will launch a popup window. In this window, I have the same six fields, a submit button, and later, I'll have LOVs, probable. However, I want to be able to fill the six fields and click on the button, which closes the window popup and fill the six original fields on the page of the form with the information in the pop-up window.I searched the forum and I tried two solutions, but none of them worked for me.
The first is a Doc official Apex of the Oracle's Web site: http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html. I followed him completely, but the popup does not open. When I click on the button to open my popup, toward which it is said that my page provided no page to create a new branch, and if I do not provide a branch to my popup, it loads the page as a normal, and not as a popup.
Another strange thing is, when I use a text link, as
javascript:callMyPopup('P1_ENAME','P1_JOB','P1_SAL');
in one<a href>
Tag, I get a JavaScript error, but not with a button.The second solution came from the site of Dene, but that didn't work either, because it seemed to be built to return a single value.
http://Apex.Oracle.com/pls/OTN/f?p=31517:50:240963430171201:RP:
Anyone know of a possible solution?
Thank you
Matt
I started from scratch and tried again the Oracle method. I can now popup window, but when I press 'Select' in the report, it doesn't do a thing.
Nevermind, it works now.
Published by: Shinnizle on March 11, 2010 14:57
Tags: Database
Similar Questions
-
What subprogramme should we prefer to return multiple values with OUT parameter?
Hello
I worked on the procedures and functions, and aware of their differences. Today I have an interview question that - suppose I don't have return multiple values through a subroutine and I want nor run any what DML within this subprogramme and I want to use this subprogramme in the SQL query. What subprogramme I would prefer - "Operating Mode" or "Function" and why?
In my view, both can be used in this case, but want to see your views and opinions.
Kind regards
Sachin jerbi
In terms of software engineering, if you claim something that you expect to "return" something (a value or values) then you use a function. If you call something to "do" something, and then you use a procedure.
THE settings are not good practices in many cases and should not strictly considered "return" of values. Instead, they are assigned values in the code and generally act as pointers to the original variable/structure that was passed as a parameter (the actual internals of Oracle don't quite do it, but in principle this is what they do).
A return value (or structure) of a function is basically push in the battery to the point that the RETURN statement is issued, and then the code calling the stack appears to assign it to a variable or placeholder, it should go in.
If it seems a little difference between procedures and functions to some people, it is recommended to use functions for obtaining values and procedures to do things, in most cases. It is not just "syntactic sugar", as mentioned above.
-
Plugin to point that returns multiple values
When you create an APEX element that can return multiple values, such as a checkbox, APEX uses the settings of varchar2 p_v01 - p_v200 instead of the p_t01 table settings - p_t200.
I would like to create a plugin item type that can return multiple values in the same way, so that the session recorded for the item state contains a delimited string of values. I realize, I could achieve with Javascript and a hidden item, but I really want to a non-Javascript solution. Is this possible? If this isn't the case, it would be a nice improvement!
Hi Tony,.
Take a look at the level of the parameter p_is_multi_value of the APEX_PLUGIN. GET_INPUT_NAME_FOR_PAGE_ITEM api (http://docs.oracle.com/cd/E37097_01/doc.42/e35127/apex_plugin.htm#AEAPI1254). If you set it to TRUE, you will get one of the p_v01 - p_v200 table settings. It's the same what our box element type calls.
Concerning
Patrick
Member of the APEX development team
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf
-
Return multiple values from a table
Hi there I'm working on a bit of sql that returns values when they exist in a table.
The code I have returns the correct value when there is an entry in the tbl_studentmodules table, as soon as there is more than one entry in this table it does display no line at all: (.)
Can someone tell how to return multiple values?
Thanks in advance!select modulename from tbl_modulefeedback where 1 = (select count(*) from tbl_studentmodules where upper(:APP_USER) = upper(student_id)) and 1 = (select count(*) from tbl_modulefeedback, tbl_studentmodules where tbl_modulefeedback.modulecode = tbl_studentmodules.modulecode)
AshleighTry this:
select modulename from tbl_modulefeedback where 1 <= (select count(*) from tbl_studentmodules where upper(:APP_USER) = upper(student_id)) and 1 <= (select count(*) from tbl_modulefeedback, tbl_studentmodules where tbl_modulefeedback.modulecode = tbl_studentmodules.modulecode)
When you ask questions, please enter CREATE TABLE and INSERT some commands to make it easier to help you.
-
I need to return multiple values in function
create or replace function f (p) in varchar2) return varchar2
is
a number (10);
Start
for loop 1 in 1.10
Select instr('yyyyyyyyynnnnnyynny','y',1,i) in the doubles.
end loop;
return a;
end;
my function return a value, but I need to return multiple values
Thanks in advanceI don't know if that's what you want (you should give expected results also)
SQL> create or replace type mytabletype as table of number; 2 / Type created. SQL> create or replace function f (p in varchar2) return myTableType pipelined is 2 a number(10); 3 begin 4 for i in 1..10 loop 5 select instr('yyyyyyyyynnnnnyynny','y',1,i) into a from dual; 6 pipe row (a); 7 end loop; 8 end; 9 / Function created. SQL> select * from table(f('1')); COLUMN_VALUE ------------ 1 2 3 4 5 6 7 8 9 15 10 rows selected. SQL>
Published by: Leo Mannhart on March 22, 2011 11:01
could even be compressed into
create or replace function f (p in varchar2) return myTableType pipelined is begin for i in 1..10 loop pipe row (instr('yyyyyyyyynnnnnyynny','y',1,i)); end loop; end;
-
Return multiple values at once of the listOfValues region
Friends,
I created a (listOfValues) region that has 4 fields/columns
ResponsibilityName, ResponsibilityId, ApplicationName, ApplicationId
I assigned a responsibility field ResponsibilityName of the listOfValues in a page.
It works fine when I select a value in this LOV. It returns a value to the field of 'Responsibility' of the page.
Is it possible to return the other 3 fields so while selecting ResponsibilityName in LOV. for example while you select a value for the field 'Responsibility', can the LOV return ResponsibilityId LOV to the 'ResponsibilityId' field in the page, at the same time?
1 selection can return values 1 to the fields?You can return multiple values in the LOV. Simply create a result to the mapping of the array element Lov to the basic element of page. Once you select a value from the LOV, the element of basic page could get filled in with the value on the table of lov whereby it has been mapped.
Concerning
Sumit -
Return multiple values from a function in a SELECT statement
I hope I've provided enough information here. If not, let me know what I'm missing.
I create a view that will combine the information from several tables. Most are pretty simple, but there are a couple of columns in the view that I need to get by running a function within a package. Even if this is quite simple (I have a function named action_date in a package called rp, for example, that I can use to return the date that I need through SOME rp.action_date (sequence_number).
Here is the question: I really need to return several bits of information of the same record (not only action_date, but also action_office, action_value, etc.)-a join of the tables will work not here, as I will explain below. I can, of course, perform a function separate for each statement, but this is obviously inefficient. Within the select statement of the view, however, I don't know how each of the values that I need to get back.
For example, right now, I have:
Table 1:
sequence_number NUMBER (10),
name varchar (30),
...
Table2:
Table1_seq NUMBER (10),
action_seq NUMBER (10),
action_date DATE,
action_office VARCHAR (3),
action_value VARCHAR (60),
...
I can't just simply join Table1 and Table2 because I have to perform processing in order to determine the rows returned matching, I really need to select. If the package opens a cursor and treats each line until it finds the one I need.
The following works but is ineffective since all calls to the package returns the columns of the same record. I don't know how to put all the values that I need in the SELECT statement.
CREATE VIEW all_this_stuff AS
SELECT sequence_number, name,
RP.action_date (sequence_number) action_date,
RP.action_office (sequence_number) action_office,
RP.action_value (sequence_number) action_value
FROM table1
Is there a way to return multiple values in my SELECT statement or I'm going about this all wrong?
Any suggestions?
Thank you very much!Hello
What you want is a Query of Top - N , what you can do using the ROW_NUMBER analytic function in a subquery, like this:
WITH got_rnum AS ( SELECT action_seq, action_dt, action_office, action_type, action_value , ROW_NUMBER () OVER ( ORDER BY action_date , action_seq , action_serial ) AS rnum FROM table2 WHERE action_code = 'AB' AND action_office LIKE 'E' -- Is this right? ) SELECT action_seq, action_dt, action_office, action_type, action_value FROM got_rnum WHERE rnum = 1 ;
As written, this returns a single line (at most).
I suspect you'll actually get a rank for each group , where a group is defined by a value in a table in which you join.
In this case, add a PARTITION BY clause to the ROW_NUMBER function.
If post you a small example of data (CREATE TABLE and INSERT statements), I could show you exactly how.
As I don't have your tables, I'll show you the use of the tables in the scott schema.
This is a view containing data in the scott.dept table and also to scott.emp, but only for the highest employee in each Department (in other words, the employee whose oldest hire date). If there be a tie for the first hire date, while the candidate with the lowest empno is selected.CREATE OR REPLACE VIEW senior_emp AS WITH got_rnum AS ( SELECT d.deptno , d.dname , e.empno , e.ename , e.hiredate , ROW_NUMBER () OVER ( PARTITION BY d.deptno ORDER BY e.hiredate , e.empno ) AS rnum FROM scott.dept d JOIN scott.emp e ON d.deptno = e.deptno ) SELECT deptno , dname , empno , ename , hiredate FROM got_rnum WHERE rnum = 1 ; SELECT * FROM senior_emp ;
Output:
. DEPTNO DNAME EMPNO ENAME HIREDATE ---------- -------------- ---------- ---------- --------- 10 ACCOUNTING 7782 CLARK 09-JUN-81 20 RESEARCH 7369 SMITH 17-DEC-80 30 SALES 7499 ALLEN 20-FEB-81
Moreover, one of the conditions to the query you posted has been
action_office LIKE 'E'
which equals
action_office = 'E'
(AS is always equivalent to = if the string that follows AS does not contain the winning cards.)
Did you mean say that or did you mean something like this:action_office LIKE 'E%'
Instead?
-
I called the procedure as belowcreate procedure emp_p ( v_r OUT emp%rowtype ) AS Begin select * into v_r from emp; end;
Errordeclare v_x emp%rowtype; Begin emp_p(v_x); end;
declare
*
ERROR on line 1:
ORA-01422: exact fetch returns more than number of lines
ORA-06512: at "SYS." EMP_P', line 4
ORA-06512: at line 4 level
Thank you
REDAinfant_raj wrote:
create procedure emp_p ( v_r OUT emp%rowtype ) AS Begin select * into v_r from emp; end;
OUT parametere v_r could contain data for one line only, so if your query
Select * into v_r from emp
returns multiple rows, you're bound to get "ORA-01422: exact fetch returns more than number of lines.
You can use SYS_REFCURSOR or Collections instead.
Vivek L
-
Hello
I have a report that uses apex_item.checkbox (...) to generate the check box. This report correctly displays a check box for each line. The source code that is generated in the html page is:
< input type = "checkbox" name = "f01" value = "202" id = "P1_CHECKBOX" / >
...
...
< input type = "checkbox" name = "f01" value = "220" id = "P1_CHECKBOX" / >
...
...
< input type = "checkbox" name = "f01" value = "210" id = "P1_CHECKBOX" / >
...
...
I want to use the javascript function $v () to get the values of the enabled check box. I thought that the return of this function all the checked values separated by ':' but I noticed that my code alert ($v ('P1_CHECKBOX')); return whenever the value of the first checkbox if it is checked.
It returns '202' if the first box is checked, but nothing, if only the second checkbox is checked and '202' if the box of the first and the second is checked.Hello
first of all, $v, $x and $s are supposed to not work for items on the page, not the columns in a table or manually generated HTML elements.
Secondly, I think that your HTML code is not correct, because each of your boxes has the same ID. But the ID must be unique in the DOM of the browser tree. Thus the different box should actually named P1_CHECKBOX_1... P1_CHECKBOX_3. Just look at what is actually generated for a page element real checkbox. BTW, I think that you should not name the checkbox as part of page elements, because they are not actually page elements. I think that this could be confusing for other developers.
Hope that helps
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
DB procedure / function can return multiple values in a PL/SQL block
Hi all
I have a problem returning to the exit procedure following in PL/SQL because I have SELECT INTO variable but with no output back in my PL/SQL block even if I turned it into a function.
. pls suggest.
CREATE OR REPLACE PROCEDURE nominations (p_start_date AS, p_end_date IN DATE)
IS
v_day_id PLS_INTEGER;
v_day_name VARCHAR2 (33);
v_day_date DATE;
BEGIN
SELECT (2 + (p_start_date + (LEVEL - 1) + LEVEL - 1 - TRUNK (LEVEL - 1 + 1, "IW" + p_start_date)) AS day_id
, TO_CHAR (LEVEL - 1, 'Day' + p_start_date) AS day_name
, TO_CHAR (LEVEL - 1, "DD-MM-RRRR" + p_start_date) AS day_date
IN v_day_id, v_day_name, v_day_date
OF THE DOUBLE
CONNECTION OF LEVEL < = 1 + p_end_date - p_start_date;
END;
/
Your insert would be something like this:
INSERT INTO PR_OPS_APPOINT_SETS (SPEC_CODE1, SPEC_CODE2, CLINIC_NO, SECTOR_ID, USER_ID, APPOINT_DATE)
SELECT r.SPEC_CODE1, r.SPEC_CODE2, r.CLINIC_NO, r.SECTOR_ID, USER, d.APPOINT_DATE
PR_OPS_CLINIC_RECS r
CROSS JOIN)
SELECT TO_DATE (TO_CHAR (LEVEL - 1, "MM/DD/RRRR" + p_start_date), "MM/DD/RRRR") AS APPOINT_DATE
OF THE DOUBLE
CONNECT BY LEVEL<= p_end_date="" -="" p_start_date="" +="">=>
) d
WHERE SPEC_CODE1 = p_SPEC_CODE1
AND SPEC_CODE2 = p_SPEC_CODE2
AND CLINIC_NO = p_CLINIC_NO
AND SECTOR_ID = P_SECTOR_ID;
In terms of getting the parameters p_SPEC_CODE1, p_SPEC_CODE2, p_CLINIC_NO, P_SECTOR_ID...? I don't have enough information on your part.
-
Function - return multiple values in a concatenated string
Hello
Is it possible for a function return a concatenated string (combining more than one number). I'm trying to return the purchase by the introduction and invoice_id number and code order number, but an invoice_id can have several PO with the same code number. I want to concatenate the PO numbers with commas, for example
10124, 10090, 10987
At the present time, the function returns NULL for those cases that have more than one purchase order number.
Thank youfunc_get_po(i.invoice_id, cc.code_combination_id) "PO No", func_get_po_requester(i.invoice_id, cc.code_combination_id, func_get_po(i.invoice_id, cc.code_combination_id)) "PO Requester",
Of course, this can be done without any problem.
If it returns NULL, then you must debug function and check the operating logic. I know that it will take a little of your time, but not problems with the logic of syntax and concatenation. -
Need help... Its Urgent...
It is:-POP Up does not return value
I have popup search in my form
JavaScript on the form HTML Header page
< script language = "JavaScript" type = "text/javascript" >
<!--
htmldb_delete_message = "'DELETE_CONFIRM_MSG" ";
->
function openLikeHoodPopUp (passVal)
{
URL = "f?" p = & APP_ID.:29: & SESSION. ': P29_X: ' + passVal;
w = open (url, "winLov", "resizable = yes, scrollbars = yes, resizable = no, status = no, width = 800, height = 400");
If (w.opener is nothing)
w.opener = auto;
w.Focus ();
}
< /script >
When the popup is displayed, it shows the data / information according to my condition.
When the user clicks on the data column report, popup should return this value.
Javascript below is on my page under heading HTML popup
< script language = "JavaScript" >
function passBackLikeHood (passVal1)
{
opener.document.getElementById("P35_CRISKLIKELIHOOD").value = passVal1;
}
< /script >
Column of URL link is:-javascript:passBackLikeHood('#NAME#');
Currently, when I am clicking on the column of the report it is not do something.
IE displays the following error
'opener.document' is null or not an object
SagarSam:
"parent.document.getElementById (.)" has not worked for me either :). However, 'opener.document.getElementById (.)' works very well!
You can try the test using another browser?
CITY
-
Possible to contain variable multiple values?
Is it possible the variable contains multiple values?
In fact, I need to hold a multiple value multiple value.
Procedure:
Remove employee where empno in (#variable)
Table Employees: Informix
variable code #:
Select relieved_employee_id in the relieved_employees (return multiple values)
Employees table raised is in SQL SERVER
any other approach simple approach...
How can I approach my requriement?Hello
Is it possible the variable contains multiple values?
Usually variable ODI hold one value returned by a select query
Procedure:
Remove employee where empno in (#variable)
Table Employees: Informix
variable code #:
Select relieved_employee_id in the relieved_employees (return multiple values)
Employees table raised is in SQL SERVER
any other approach simple approach...
How can I approach my requriement?
You can try something simiral to the following
create an ODI procedure
Command on the source tab:
SQL SERVER technology
Logic diagram should point to your schema that contains the table of relieved_employeesquery: Select relieved_employee_id you relieved_employees EMP_ID
Target control on the tab:
Technology: Informix
Logic diagram should point to your schema that contains the employees tablequery: delete from employee where empno = #EMP_ID
This will make a loop through all the values returned by your query source and delete target.
Thank you
Fati -
Passing multiple values at the request of the State (no status page)
Hello
[APEX 4.2.4.00.08 on the 11.2.0.3 database]
I didn't know how to explain briefly what I need in the title of the discussion, that's why I added the song "(non page rapport)". " I met a lot of threads associated with passing of selections multiple values from one page to another, or via a URL from one page to another. I know how to do this. The problem I have right now is trying to pass the commas of the values contained in an application to a report query element. Here's where the "(rapport non page) ' comes into play." I refer to the report query at the level of the application (i.e. shared components-> report queries). I wish really it had another name for it. "Report on the application of queries", perhaps?
In any case, my report query has a bind variable, AI_ID_NUMBERS, that is defined correctly in the shared-> components report queries. However, when this item application has multiple values such that AI_ID_NUMBERS = 4, 5, 6, 7 etc., my URL looks like this:
myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7
So, this returns only one record for the report where the identification number is 4, one. I tried a string parameter of Substitution of Application (URL_REPORT_1) with the two following variants (for which both return only a single record):
Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS: & AI_ID_NUMBERS.
Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS:-& AI_ID_NUMBERS. \
returns...
myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7
myapexsite.com/f?p=456:2:1234567890:PRINT_REPORT=report_1:::AI_ID_NUMBERS:\4,5,6,7\
.. .respectively
I really thought that the backslashes would have solved the problem. Any ideas why my report request (PDF) returns only one line?
Thank you
-Seth.
Well, too bad. I realized the mistake I did.
When you work with 'request report queries', there is an option to include variable bind, for example the application or page elements. I had already done that, but for some reason, thought that I also had to pass the parameter and its values in the URL. This is not necessary since the report query query already has the issue of the application/page related to it. The following URL works fine:
myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1
And, Yes, it's the URL that is provided when you set up a "application report query. I was thinking too hard.
-Seth.
-
I want to pass multiple values method AM controller
Hi all
Can someone tell me please how to pass multiple values of AM method to the controller.
Thank youYou can make use of the ArrayList
In CO
OAApplicationModlue am = pageContext.getApplicationModule(webBean); ArrayList values = (ArrayList) am.invokeMethod("PassArray");
In AM
public ArrayList PassArray { ArrayList values = new ArrayList(); values.add("value") values.trimToSize(); return values; }
Thank you
AJ
Maybe you are looking for
-
How to exclude the songs, didn't like in a smart playlist
How exclude the songs didn't like in a smart playlist.
-
F.Fox will not redirect sometimes
Repeatedly Fire fox set up a bar says:"Firefox prevented this page automatically redirecting to another page.Then there's a box to click ALLOW. A few times it will redirect sometimes I get the "Firefox prevented etc etc... bar and more.»How can I dis
-
xw8400: graphics windows 10
I recently set up my new processor using the advice of the old geekster and sdh. I have the os on an intel ssd 320 and 3 disks 300 GB sas for storage. Problem is now Quadro fx 3400 video card works but no driver is present, run the option to display
-
3480CT: try to update BIOS fails
HelloI have a CT 3480 and wanted to update the BIOS, but only the FDD USB Toshiba drive. During the reboot with BIOS disk in, the drive starts perfectly, but indicates "non-system disk error" and will not perform the update.Is FDD drive the culprit,
-
5542 want: Instant ink Plan
Just bought this printer from Q V C the shopping channel. It came with a plan to "LIGHT." However when I tried to record this nothing shown on the web site of HP. So I had to buy the casual plan which costs £1.99 per mth. What happened to the plan 'L