How to pass an array of values to a view criteria
Hi all,
How to pass mutiple values as array into a view criteria.I want to search
based on mutiple values.
Please help.
Thanks
Swapna wrote:
I have a search panel with mutilselect combobox for attributes "a","b", & "c".
Based on selction"a" ,I need to filter the comboboxes "b" and "c".
This's the requirement.I'm not sure that I understand your question. Are you saying that you have three different controls in your UI? Or one control that has three possible values?
Assuming that you have one control with three possible values, if "a" is selected, does that mean that you want all rows where some column has a value of "a"? Or does that mean that you want all rows where that column does not have a value of "a"? Or does that mean that you want all rows where that column has a value of "b" or "c" (note that the last two may be different if the column allows NULL values).
What language is your application written in? What framework/ library are you using to access the database? Are you passing a PL/SQL collection of selected values?
Justin
Similar Messages
-
How to pass the check box values from one view to another view
Hi Experts,
I have a selection screen view which consists of check boxes.
WBS System status.
Release Completed Closed as 3 check boxes.
Note : The above ones are check boxes.
Based on the selection made by the user, those values needs to be passed to second view which retrieves the data and
displays the data accordingly.
At the same time if the user does not make any selection, then WBS System status should contain Released, Completed and Closed values and that needs to be sent to Second view.
Kindly advise.
Regards,
Chitrasenhi ,
make a attribute of type WDY_BOOLEAN to achieve this functionality
u need to follow these steps :
1 in side ur component controller , under the ATTRIBUTES tab , make 3 attributes say attr1 , attr2 and attr3 of type WDY_BOOLEAN
2 create a context node , cn_check and 3 context attribute ca_check1 , ca_check2 and ca_check3 in ur first view for
release , complete and close check boxes
3 inside the DOINIT of ur 1st view , set the attributes attr1 , attr2 and attr3 to blank
wd_comp_controller->attr1 = ' '
wd_comp_controller->attr2 = ' '
wd_comp_controller->attr3 = ' '
4 inside the method , where u r validating , if the check boxes are checked or not , read the attributes ca_check1 , ca_check2 and
ca_check3
DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
DATA ls_cn_check TYPE wd_this->element_cn_check.
DATA lv_ca_check1 LIKE ls_cn_check-ca_check1.
* navigate from <CONTEXT> to <CN_CHECK> via lead selection
lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
* get element via lead selection
lo_el_cn_check = lo_nd_cn_check->get_element( ).
* get single attribute
lo_el_cn_check->get_attribute(
EXPORTING
name = `CA_CHECK`
IMPORTING
value = lv_ca_check1 ).
IF lv_ca_check1 EQ 'X' .
wd_comp_controller->attr1 = ' X'
wd_comp_controller->attr2 = 'X '
wd_comp_controller->attr3 = ' X' -
How to pass an array to a stored procedure
create or replace package demo_pkg
as
type cityArray is table of city%rowtype index by binary_integer;
procedure city_report( p_inputs in cityArray );
end;
CREATE OR REPLACE PACKAGE BODY demo_pkg
AS
PROCEDURE city_report (p_inputs IN cityarray)
IS
BEGIN
FOR i IN 1 .. p_inputs.COUNT
LOOP
DBMS_OUTPUT.put_line ( 'citycode = '
|| p_inputs (i).city_code
|| ' CITYDESCRIPTION = '
|| p_inputs (i).city_description
INSERT INTO testing
(city_code, city_description
VALUES (p_inputs (i).city_code, p_inputs (i).city_description
commit;
END LOOP;
END;
END;
to call that procedure ia m using this
declare
my_data demo_pkg.cityArray;
begin
my_data(1).city_code := 1234;
my_data(1).CITY_DESCRIPTION := 10;
my_data(2).city_code := 4567;
my_data(2).CITY_DESCRIPTION := 20;
my_data(3).city_code := 4321;
my_data(3).CITY_DESCRIPTION := 30;
demo_pkg.city_report( my_data );
end;
but actually the procedure (demo_pkg.city_report)is called from front end(.net).how they will call this procedure in .net invironmentHi,
Your exact question has been asked before, see: http://asktom.oracle.com/pls/ask/search?p_string=How+to+pass+an+array+to+a+stored+procedure
or do a search on this forum.
And please use this tag => (yes, just the 4 characters forming the word 'code' between curly brackets)
*before* and *after* your example to maintain formatting and indentation, it's hard to read now.... -
How to pass an Array to jsp:param
Hi,
I am trying to find out how to pass an array to a jsp:param tag abnd then retrieve
the values in the next page. Please help soon. Thanks
Here's my code - Assume the books array has more than 1 value
String[] books = request.getParameterValues("book");
<jsp:include page="<%=contentPage%>" flush="true">
<jsp:param name="bookSelected" value="<%= books %>" />
</jsp:include>
The 'contentPage' takes me to the next page where I have the following to retrieve
the value of 'bookSelected'
String[] bookSelected = request.getParameter("bookSelected");
I tried accessing the array like this
if(bookSelected.equals("book1"))
but did not succeed.
I tried accessing the array in a loop but it did not work. Here's what I tried.
<jsp:include page="<%=contentPage%>" flush="true">
<%for (int i = 0; i<books.length; i++){
%>
<jsp:param name="bookSelected" value="<%= books %>" />
<% } %>
</jsp:include>
Hi
tell me how you redirect from __confirmdelete.jsp:__ to deleteServlet.java..
and post detail code of __confirmdelete.jsp:__ -
How to pass more than one value for one column in procedure
hi
select id, name from col_tab where dept_name in ('ECE','CIVIL');
when i was running this it is working well.
CREATE OR REPLACE PACKAGE pack_str
AS
TYPE type_refcur IS REF CURSOR;
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
END pack_str;
CREATE OR REPLACE PACKAGE BODY pack_str
AS
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
IS
BEGIN
OPEN ans FOR
select id,name from col_tab where dept_name in char_in ;
END str;
END pack_str;
the package was created.
my doubt is
1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
2. when i was storing the value in string like val = 'ECE,CIVIL' ,
how to get the id,name for ECE and CIVIL.
plz help meHi Rebekh ,
I am recreating your packages for the desired output.
CREATE OR REPLACE PACKAGE pack_str
AS
TYPE type_refcur IS REF CURSOR;
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
END pack_str;
CREATE OR REPLACE PACKAGE BODY pack_str
AS
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
IS
lv_t varchar2(200);
BEGIN
lv_t := REPLACE(char_in,',',''',''');
lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
OPEN ans FOR lv_t;
END str;
END pack_str;
Note:-
Input Parameter char_in is a comma seperated value for dept_name
-Debamalya -
How to pass int array as an IN parameter to PLSQL Procedure
Hi,
How to pass int array in java to a stored procedure througn jdbc
and what type of data type I should declare to this IN parameter
in PLSQL Procedure.
Thanks,
SimiHi,
The best way to do what you want depends on what you want. Start by describing what you need to do. It's best to post some sample data (CREATE TABLE and INSERT statments) and what results you want from that sample data. (See the forum FAQ: https://forums.oracle.com/message/9362002)
If you have ideas about how to do the job (e.g., populating a temporary table) it can be helpful to include those, too, but distinguish clearly between WHAT you need to do and HOW you might do it.
As Bencol suggested, a SYS_REFCURSOR might be the best way to pass back the results.
Since you didn't post your table, or even describe what you wanted to do with it, I'll illustrate using scott.emp, which is probably on your system.
Say you wanted a procedure that took a DATE as an argument, and returned a some designated columns (empno, ename and hiredate in the example below) for all employees hired on or after the given DATE. You might write a procedure like this:
CREATE OR REPLACE PROCEDURE hired_since
( start_date IN DATE
, out_data OUT SYS_REFCURSOR
AS
BEGIN
OPEN out_data FOR
SELECT empno, ename, hiredate
FROM scott.emp
WHERE hiredate >= start_date;
END hired_since;
SHOW ERRORS
You can test it in SQL*Plus like this:
VARIABLE c REFCURSOR
EXEC hired_since (DATE '1982-01-01', :c);
PRINT :c
The output I got from this test was:
EMPNO ENAME HIREDATE
7788 SCOTT 19-APR-87
7876 ADAMS 23-MAY-87
7934 MILLER 23-JAN-82 -
How to pass the FORM Fields value by Form Personalization
Hi ALL,
I want to pass form filds values in to procedure. I am calling this procedure through form personalization of that form..... But it's not accepting any form field's value there... when i am passing hardcoded vales procedure is executing fine...
can any one suggest what to do???
i tried with these syntax
TEST_EMP_FP(:ADDR.ADDRESS_ID,'ABC')
TEST_EMP_FP(${item.ADDR.ADDRESS_ID.value},'ABC')
Regards
RaviHi,
Iam calling an SRS from forms personlization. Can any body tell me how to pass the Form field values as parameters to the Reports. (Example when they call this Concurrent request from Transact5ions screen, The invoice number should be defaulted in the report parameter).
Regards,,
Anil. -
I am ussing a DLL created by another party. I have the list of the C declaretions. I have been able to write a seq that can turn the comport ON/OFF or select a different port but I have not been able to send or recieved any data. I have created an array of bytes(unsigned 8-bit integers)to send and recieved data but nothing goes out or in.
Hi Toro,
There is an example in your \Examples\AccessingArrays\PassingArrayParametersToDLL directory that illustrates exactly how to pass TestStand arrays as arguments to dll functions. The source files for the .dll are located in the same directory.
For more information on passing arrays as parameters to modules you should read the "DLL Flexible Prototype Adapter" section of Chatper 13 in the TestStand User Manual, and pay special attention to the subsection entitled "Array Parameters". You can access the User Manual from the TestStand Start Menu group, the TestStand Sequence Editor's Help menu, the \Doc directory, or online at the following link:
http://digital.ni.com/manuals.nsf/websearch/50B69DA356B8D38C86256A0000660E6B?OpenDocumen
t&node=132100_US
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask -
State machine custom task workflow how to pass one task field value to the next task field
i am using ItemMetadata.xml to pass value from list to custom task first value its passing the but second value is showing as null
plus how to pass one custom task value to the next custom task
i.e one supervisor approver comments submitted field i want to see on department manager approval custom task which is the next approver from supervisor
ows_firstfield=""
ows_SecondField=""
the above ows fields are from list
in this i am unable to retrive the second value in the task form this is my first query?
second query is that how can we pass one task field value to next approver task field value?
any idea
MCTS,ITILWhat type of workflow is this? IS this Visual Studio or SharePOint designer or third party (K2, Nintex, etc...)? YOu should be able to get ahold of the task that was edited via the correlation token, and then grab any value you want from that
task (wether it be a custom field or a standard worfklow task field).
It would help to know what you are using to build the workflow.
Thanks! -
How to pass in a parameter into a report viewer on a jsp - and hidden
Hi, I've built a php application and am using the java environment to enable the crystal report/viewer. The developer was looking how to pass in a parameter into a report viewer on a jsp. Ultimately the end product we need is to get an HTML report viewer loading a report file with hidden parameters so to not expose other customer data (it's a shared database for multiple customers) preferably loaded from php using maybe the php java bridge. Would anyone happen to have any sample code or any guidance?
<%@ page contentType="text/html; charset=UTF-8"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer"%>
<%
// just a test to grab rpt name from GET
String rptFile = "report_files/" + request.getParameter("rpt");
%>
<crviewer:viewer reportSourceType="reportingComponent" viewerName=""
isOwnPage="true">
<crviewer:report reportName="<%= rptFile %>" />
</crviewer:viewer>
Many thanks in advance!
MarkI am not aware of any html tags you can pass to the viewer for parameter values. Normally, you would load the report in code and then use the SDK with the report object to pass parameter values.
-
How to Pass String array from Java to PL/SQL and this use in CURSOR
hi,
I cant understand how to pass Array String as Input Parameter to the Procedure and this array use in Cursor for where condition like where SYMPTOM in( ** Array String **).
This array containing like (SYMPTOM ) to be returned from the java to the
pl/sql (I am not querying the database to retrieve the information).
I cannot find an example on this. I will give the PL/SQL block
create or replace procedure DISEASE_DTL<*** String Array ***> as
v_SYMPTOM number(5);
CURSOR C1 is
select distinct a.DISEASE_NAME from SYMPTOM_DISEASE_RD a
where ltrim(rtrim(a.SYMPTOM)) in ('Fever','COUGH','Headache','Rash') ------- ***** Here use this array element(like n1,n2,n3,n4,n5..) ******
group by a.DISEASE_NAME having count(a.DISEASE_NAME) > 3 ----------- ***** 3 is no of array element - 1 (i.e( n - 1))*****
order by a.DISEASE_NAME ;
begin
for C1rec IN C1 loop
select count(distinct(A.SYMPTOM)) into v_SYMPTOM from SYMPTOM_DISEASE_RD a where A.DISEASE_NAME = C1rec.DISEASE_NAME;
insert into TEMP_DISEASE_DTLS_SYMPTOM_RD
values (SL_ID_SEQ.nextval,
C1rec.DISEASE_NAME,
(4/v_SYMPTOM), --------**** 4 is no of array element (n)************
(1-(4/v_SYMPTOM)));
end loop;
commit;
end DISEASE_DTL;
Please give the proper solution and step ..
Thanking you,
AsishI've haven't properly read through your code but here's an artificial example based on a sql collection of object types - you don't need that, you just need a type table of varchar2 rather than a type table of oracle object type:
http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/ -
How to pass an array to a subroutine in FXscript?
Hi,
I am having problems trying to pass an array to a subroutine in FXscript. Code segment:
on TestSub(value x)
// do stuff
end
float i, testarray[256];
for i = 0 to 255
testarray[i] = i;
next
TestSub(testarray);
FXscript returns the error "missing close parenthesis". If TestSub(testarray) is replaced with TestSub(testarray[0]) no error, i.e. if a single value is passed.
Trying to define the subroutine differently doesn't help, e.g. "on TestSub(value x[255])" or "on TestSub(float x[255])" yields the same error.
How do you pass an array to an FXscript subroutine? Or is it not possible?
Thanks for any clues...You are not being quite clear. If the next frame expects a pointer to a buffer, it cannot be a vi. Labview has no pointer types. You must be referring to a Call Library Node which is set up to call a DLL function. If this is the case, you need to configure the Call Library Node to accept an array of the data type. Then you can wire the array into the call library node.
Is this the case, Call Library Node?
- tbob
Inventor of the WORM Global -
How to pass an array which in the jsp to a javascript file
now i have 2 files: jsp and js(javascript)
i want pass an array which in the jsp to another file--> js file
how can i do it ???
can u give me some related links or some source codes as the references???
thxbcos ....my senior has resigned!!! so i take over his job !!!!!
depend on the talent and the project ....only that way to implement to whole project !!!!
but , i had settled it already ....
it is very simple
in the middle.jsp
Collection result = menuManager.getUserRoleMenu(webSessionUser.getGnuserId());
String menuname[]=new String[110];
int menucounter=0;
Iterator vi = result.iterator();
while(vi.hasNext())
HashMap hm=(HashMap)vi.next();
menuname[menucounter]=hm.toString();
menucounter++;
int i;
String tempstr="";
for(i=0;i<menuname.length;i++)
tempstr+=menuname[i]+",";
session.setAttribute("menuname",tempstr);
%>
<script language="javascript">
menu123("<%=tempstr %>");
</script>
in the body,js
function menu123(string123)
//doing
so ....through the script --menu123
i can get the string from jsp to the js!!!!!
is it very simple, but it spends my 2 days!!!
i just learn javascript ....about 1 month !!! -
How to pass tag name and value dynamically in the output of PCo notification?
Hi,
I have a requirement to develop such a scenario where there can be multiple no of tags in PCo (Say 10) but there will be single notification to push the tag name when the value got changed and the changed value to MII. for any value change for any of the tag, the notification will be trigger. So As per my knowledge I have to pass the tag name and value dynamically in the "output" tab of the notification. But need your support to find out how to pass them dynamically.
Thanks in advance.
Regards,
SumanHi Suman/Jeedesh,
As per Pco notification, it will trigger whenever any of the tag value changes in Agent instance subscription items.
For above issue, My suggestion
1. Create DB table name TAGLIST with 200 tags as rows in columns (Tagname, TagValue)
2. Based on notification trigger, create a transaction and update values w.r.t TagNames in above table
3. Next time, when notification trigger with fresh value for any of the tag, cross check with existing TagName with Value and update in DB table.
4. And in the mean time, send those Tag details vie mail trigger or as per requirement
Instead of creating 200 notification, above is a just alternate way suggestion to achieve dynamic tag value change notification.
Hope it might solve your problem
Regards,
Praveen Reddy -
How to pass an array in Oracle Procedure
If I have to pass an array as an argument in Oracle Procedure/function. How to do that ??
For example, I have to pass the names of employess and then for these employess I have to do something in Oracle Procedure.
Thanks & Regards,
VinayHi!
Here is an example:
create or replace procedure test
is
type v2_itt is table of varchar2(2000) index by binary_integer;
l_v2 v2_itt;
procedure test2( pi_v2 v2_itt ) is
begin
for i in 1 .. pi_v2.count loop
dbms_output.put_line( pi_v2(i) );
end loop;
end;
begin
l_v2(1) := 'name1';
l_v2(2) := 'name2';
test2( l_v2 );
end;
Regards,
Andrew Velitchko
BrainBench MVP for Developer/2000
http://www.brainbench.com
Maybe you are looking for
-
How to blick tree view few specific nodes
here i got a code which show how to blink tree view node but i am confuse that how to blink few node. Answered by: Avatar of Tamer Oz 20,185 Points Top 0.5 Tamer Oz Partner Joined Sep 2009 2 8 17 Tamer Oz's threads Show activity Treeview control - Ho
-
Looking for reliable sync for contacts and calendar
Does anyone know of a reliable app that will sync contacts and calendars between my droid and my pc? I use outlook (not exchange). I have no problems syncing gmail and webmail. I tried Missing Sync but it won't bring contacts from my phone to my p
-
Inserting a link in Adobe forms central?
How do I insert an internet link on a Form in adobe forms central?
-
If I don't install lion will I be cloud less next june
I am not planning on installing lion. On reason is iTunes 10. I don't like it, the only reason I have it installed is to update my iPhone. I use iTunes 9 for everything else. iTunes is colorless and it sounds like finder is also. If I don't upgr
-
How do I turn cookies complely on in safari.
How do I turn cookies completely of for safari on.