OBIEE - Using Multiple Select Rows In Grid As Parameters
Hello All,
First post from an OBI Newbie. I am getting used to creating dashboards and have got my head around drilling with values, but I have a user requirement that I am not sure is possible.
A standard query returns the following datagrid information ("," = column divider):
Product Id, Product Description, Colour, Total Sales
1, Chair, Red, 4
2, Chair, Blue, 3
3, Chair, Black, 5
I know that I can enable a drill on a specific colour to give a datagrid such as (if Red Selected):
Order Reference, Product Id, Product Description, Colour, Units
687678657, 1, Chair, Red, 3
687678658, 1, Chair, Red, 1
The user requirement is to select multiple rows (possible by holding Ctrl) and to then effectively "drill" with the multiple selected values. Eg Red, Blue:
Order Reference, Product Id, Product Description, Colour, Units
687678657, 1, Chair, Red, 3
687678658, 1, Chair, Red, 1
687678660, 2, Chair, Blue, 3
I presume that a separate report will be required, but I am not sure how to trigger and/or pass the multiple product id's. Can anyone help with a solution?
Edited by: 885689 on 16-Sep-2011 06:27
I got this working by changing the signature of the Application Module method to use ArrayList rather than String[], then you can marshal the Struts FormBean contents into an ArrayList to pass up.
To do this, subclass the DataAction by using "Go To Code" off of the context menu and then override the initializeMethodParameters() method:
protected void initializeMethodParameters(DataActionContext actionContext, JUCtrlActionBinding actionBinding)
//Get the String Array from the Form Bean
String[] selection = (String[])((DynaActionForm)actionContext.getActionForm()).get("multiSelect");
//convert that to an ArrayList
ArrayList selectionArr = new ArrayList( Arrays.asList(selection));
//Add that object to the Arg List for the AM method
ArrayList params = new ArrayList();
params.add(selectionArr);
actionBinding.setParams(params);
}
Similar Messages
-
Hi
I use JDev 11.1 with ADF, i have grid, i need to get selected row of grid when i press buttom, how can i do that?
ThanksHi,
You have a table in your page that is based on a viewObject iterator and you need to get the selected row in your backing bean when you click on a button.
Did I get this right?
If so then you need to add an actionListener on this button that executes a method in the backing bean.
the button code:
<af:commandButton text="commandButton 1" id="cb1"
actionListener="#{myBean.buttonActionListener}"/>In this method you need to add code like this:
public void buttonActionListener(ActionEvent actionEvent) {
BindingContext bindingctx=BindingContext.getCurrent();
DCBindingContainer bindings=(DCBindingContainer)bindingctx;
DCIteratorBinding iter= bindings.findIteratorBinding("iteratorName");
Row currentRow=iter.getCurrentRow();
}If this is not what you need give some more details.
Gabriel -
How to use multiple selection parameters in the data model
Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
My data template is the following (it's very simple...I am just testing how the parameters work):
<dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
<parameters>
<parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
<parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
</parameters>
<dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
<dataQuery>
<sqlStatement name="Q2">
<![CDATA[
select deptno, dname,loc
from dept
&p_where_clause
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_DEPT" source="Q2">
<element name="deptno" value="deptno"/>
<element name="dname" value="dname"/>
<element name="loc" value="loc"/>
</group>
</dataStructure>
</dataTemplate>
The 2 parameters are based on these LOV:
1) select distinct dname from dept (p_dep_2_param)
2) select distinct loc from dept (p_loc_1_param)
and both of them have checked the "Multiple selection" and "Can select all" boxes
The package I created, in order to use the lexical refence is:
CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
as
p_dep_2_param varchar2(14);
p_loc_1_param varchar2(20);
p_where_clause varchar2(100);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
then
p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
else
p_where_clause := 'where 1=1';
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
it works perfectly....
Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
So my questions are these:
1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
Thanks in advance for any suggestion
AlexAlex,
the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
So change your package to (you need to expand your variables)
create or replace package bip_departments_2_parameters
as
p_dep_2_param varchar2(1000);
p_loc_1_param varchar2(1000);
p_where_clause varchar2(1000);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
create or replace package body bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
p_where_clause := ' ';
if p_dep_2_param is not null then
if instr(p_dep_2_param,',')>0 then
p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
else
p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
end if;
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
end if;
end if;
else
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
end if;
end if;
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
Regards
Rainer -
Using multiple select lists in ADF
Hi,
I am trying to use a multiple select list in my JSP page, and have a method in the ApplicationModule be called when the Struts action is called. I am following the example ADF tutorials, where the method is added to the ApplicationModule class, then dragged onto the Stuts Flow diagram (to associate it with an action).
I am able to create a dyna form bean for the page that contains the multi select as a type "java.lang.String[]" (string array). I am able get that values that were selected in a normal action's "execute" method. For example:
msf = (DynaActionForm) form;
String[] statusSelection = (String[]) msf.get("multSelectList");
However, I cannot seem to get the "multSelectList" values into a method in my Application Module class. The "multSelectList" is defined in my dynaFormBean as a String[] type. I am passing it in as an argument like the following....
public void setParams(String multSelectList[]) {
This results in the method not being called at all. I am not sure why. Does this have something to do with a String[] not being serializable??
However, if I just attempt to pass other types form items to the method, it works. For example:
public void setParams(String simpleCheckbox) {
Does anyone know how to use multiple select lists in conjunction with ADF?
P.S.
my multSelectList looks something like this:
<select name="multSelectList" multiple size="5">
<option value="ALL">Select All</option>
<option value="preferred">Preferred</option>
<option value="standard">Standard</option>
<option value="approved">Approved</option>
<option value="interim">Interim</option>
</select>I got this working by changing the signature of the Application Module method to use ArrayList rather than String[], then you can marshal the Struts FormBean contents into an ArrayList to pass up.
To do this, subclass the DataAction by using "Go To Code" off of the context menu and then override the initializeMethodParameters() method:
protected void initializeMethodParameters(DataActionContext actionContext, JUCtrlActionBinding actionBinding)
//Get the String Array from the Form Bean
String[] selection = (String[])((DynaActionForm)actionContext.getActionForm()).get("multiSelect");
//convert that to an ArrayList
ArrayList selectionArr = new ArrayList( Arrays.asList(selection));
//Add that object to the Arg List for the AM method
ArrayList params = new ArrayList();
params.add(selectionArr);
actionBinding.setParams(params);
} -
How to display multiple selected rows in a table inside a popup?
Hi,
I have a table on which multiple selection is enabled. I am able to get hold of multiple selected rows i.e. i am able to iterate over the selected row keys and print their values. Now, my problem is how to display the contents of all the selected rows in a popup? I get the details of only one row when I launch the popup.
Thanks
KaranHi,
Not confident if this works or not but just try it...
1. create a ViewLink between the same view Object.
The source and destination wil be the same Vo and the source and destination attribute will be the pk of both Vos.
2. Update the changes in Appln Module.
Open the AM and in DataModel tab .
select the Same VO from which you created table in the DataModel Listbox and select the VL in the "Avaible View Objects" List Box. Add under it(selected vo in datamodel listbox).
3. Refresh DataControl accordion.
4. in your jsff page drag and drop the child vo as a table..
See if it works
Regards,
Santosh. -
Ranges input using multiple selection in select-options
Hello,
I have declared a single selection field with multiple selection as follows:
SELECT-OPTIONS:
S_PONUM FOR EKKO-EBELN NO INTERVALS,
If a range is entered using multiple selection, no value appears in the selection field on screen, however, the ranges tab in multiple selection shows the range. Is there a way to programatically test if a range has been entered using multiple selection? Help is appreciated.
RegardsHi,
If you not displaying the intervals then user can enter only one value then option field will be with 'EQ' sign.
LOOP AT S_PONUM.
IF S_PONUM-OPTION NE 'EQ'
" Then Values are entered using the multple selections
ENDIF.
ENDLOOP. -
How to filter out multiple rows , using multiple selection criteria ?
Dear Expert's,
I am stuck with a problem while designing my dasboard.
I have data in the following format.
Year - Quarter - Customer - Division - KF1 - KF2
2005 - Q1 - SAP - Consulting - 10 - 20
2005 - Q2 - IDE - Food - 20 - 10
2005 - Q2 - SAP - Jets - 12 - 11
2006 - Q2 - RAM - Jets - 11 - 11
What i wish to do, is to create radio box(for selection) to choose any Year, Quarter , Customer & Division
eg if the user chooses 2005 , i want to display 3 line entries
2005 - Q1 - SAP - Consulting - 10 - 20
2005 - Q2 - IDE - Food - 20 - 10
2005 - Q2 - SAP - Jets - 12 - 11
if the user further selects quarter - Q2 (without disturbing the selection on for year ) the result should be
2005 - Q2 - IDE - Food - 20 - 10
2005 - Q2 - SAP - Jets - 12 - 11
If the selection from year is removed (still maintaining the selection on quarter Q2 ) the result should show
2005 - Q2 - IDE - Food - 20 - 10
2005 - Q2 - SAP - Jets - 12 - 11
2006 - Q2 - RAM - Jets - 11 - 11
Simply i need to create a filer for all the fields.
The issue that i am facing with filer component is that - 1 - it returns only one desitnation row , 2 - you can only get Key values in result set
Issue with combo box is i cannot select multiple fields (dimensions) using it .
Please suggets .
Thanks in AdvanceHi Ankit,
There is a workarround that requires some excel work.
Here you need to follow the above mentioned steps along with this you need an additional combo box (wont be displayed at runtime, it will fetch the entire data if we select blank for the first combo box).
Now suppose we are using 2 combobox C1 and C2 and our data is from B3 to F6.
Now for C1 (one we are using for selection)
1. select the labels as Sheet1!$B$2:$B$6 (a blank cell is added for all selection)
2. Insertion type as filtered Rows
3. Take source data as Sheet1!$B$2:$F$6 (includeing one blank row)
4. selected Items as none
5. for C2 labels as Sheet1!$A$3:$A$6 source data as Sheet1!$B$3:$F$6 destination as Sheet1!$B$14:$F$17.
6. Selected Item : Sheet1!$B$9 (blank Type dynamic). So it will select the entire table, if nothing is selected.
7. take a Grid component and map it to Sheet1!$H$9:$L$12. use formula as =IF(IF($B$9="",B14,B9)=0,"",IF($B$9="",B14,B9)) on cell H9. Where we take H6 to L12 as final data set. Tis will become the data for next set fo Combo box for further selection.
8. follow the same steps for other combobox selections.
9. control the dynamic visibility of grids on the basis of Destination cell (like B9).
Revert if you need further clarification.
Regards,
Debjit -
How to use DirectCast for multiple selected rows?
Hi<o:p></o:p>
Me.SecondBindingSource.DataSource = DirectCast(parentForm.FirstBindingSource.Current, DataRowView) works perfect for single items but how do I do it if I've selected multiple rows on datagridOne and want to pass only the selected rows to datagridTwo using DirectCast?
Me.SecondBindingSource.DataSource = DirectCast(main.FirstBindingSource.Current, DataRowCollection) does not work??<o:p></o:p>You have to put the rows into a datatable. It is usually best if your original source is a datatable. The filter the original datatable. The selected rows of the datagrid are the same row numbers in the source datatable.
jdweng -
Evaluate multiple selected rows within ABAP WD ALV
Hi,
I am using ALV within WebDynpros for ABAP. It's easily possible for users to select multiple rows. Subsequently I'd like to process only the selected rows further. How would I find out, which rows were selected?
There should be a standard way via wd_this or wd_context, I don't seem to have found it yet.
All ideas are appreciated.
Regards, ReneHi Rene,
If you use external context binding to pass the table, the information of the selected rows should be available in the context node you passed (Get_Selected_elements).
Ciao, Regina -
Hi all,
I need to get all the selected row of a table and pass it to another node .I followed the thread Re: How to Select Multiple Rows from a Table in Webdynpro Abap
but i am getting errors in the following code
LOOP AT lt_temp INTO wa_temp.
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
it is throwing move-corresponding error.
Is there any other way of doing it?
Thanks,wa_temp->get_static_attributes(
IMPORTING
static_attributes = ls_node1 ).
ls_node1 is of type node1
and
above declaration implies ls_node1 is type IF_WD_CONTEXT_NODE
wa_temp is of type wa_temp type ref to if_wd_context_element.
above declaration implies wa_temp is of type IF_WD_CONTEXT_ELEMENT
i tell you the easy way, use the CTRL+F7 wizard to Read Context attribute from the context. This will generate the correct code for you to understand exactly how to fetch the attribute value.
for example if i want to read value of attribute STATUS_VISIBILITY from a NODE say NODE_UTILITY
generated code looks like below.
DATA:
node_utility TYPE REF TO if_wd_context_node,
elem_utility TYPE REF TO if_wd_context_element,
stru_utility TYPE if_v_podetails=>element_utility ,
item_status_visibility LIKE stru_utility-status_visibility.
* navigate from <CONTEXT> to <UTILITY> via lead selection
node_utility = wd_context->get_child_node( name = if_v_podetails=>wdctx_utility ).
* get element via lead selection
elem_utility = node_utility->get_element( ).
* get single attribute
elem_utility->get_attribute(
EXPORTING
name = `STATUS_VISIBILITY`
IMPORTING
value = item_status_visibility ).
greetings
Prashant -
Multiple people using multiple select list
Hi,
First of all, let me congratulate Oracle HTML DB for bringing such a great product. It is extremely powerful, and useful.
I have multiple people using a form which has multiple selects in it and calls an Oracle report. I looked at couple of examples and I couldnt understand how IDs work in this scenario. It is not clear if I need to create an id on HTML DB side or on the Oracle reports side or at the database level. Obviously, if people delete or select each others selected parameters, it is a big issue. Could you please explain me about how this is achieved.The touch ID is only for accessing the device, no log is kept, and no apps can access its details.
You can create multiple fingerprints within a single device so more than 1 person could access it, but there is no detail of who accessed it or when.
You may be better served looking at a portable time clock device that uses RFID cards for login and out or similar to this
http://www.mjobtime.com/default.aspx?source=adwords&kw=portable+time+clock&gclid =CLWz2Pat18ACFSsV7AodCTsALQ -
USING MULTIPLE SELECT VARIABLE IN A SQL STATEMENT
In HTMLDB, the value of the parameter of a multiple select box is colon delimited(ie P6_Name = Smith:Jones:Burke). Is there an easy way to use this parameter in a SQL statement?
Example
Select *
from names
where
Name=P6_Name
Select *
from names
where
Name IN ('Smith','Jones','Burke')
Thank youThank you for your response! I'm an idiot. It didn't make sense to me because your talking about a <i>multi-select</i> variable and I was thinking about a <i>select-list</i> variable. My problem is that I need to assign a list of values to one select list item.
<br>
For example:
<br>
SELECT * FROM EMPLOYEE
WHERE EMPLOYEE_TYPE IN ( :SELECT_LIST_RETURN_VALUE );
<br><br>
With the select list as
<br><br>
Display value = All Types, Some Types, One Specific Type<br>
Return Value = (Type1, type2, type3), (type1, type2), (type3)
<br><br>
I've just started in all of this so I'd imagine that I'm probably going about it wrong. -
How to use multiple selection in parameters
Hi all,
I have a test report with department name as a parameter, hr.employees is the table.I checked the multiple selection for the parameter.When I choose one department name, the report runs well. But when I choose more than one department name, the report doesn't work.Seems the error is query's error. I have to edit query for the multiple selection? how to do it?Using dynamic where clause in the query?
Any answer is very welcome,I really appreciate it. Thanks.Alex,
the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
So change your package to (you need to expand your variables)
create or replace package bip_departments_2_parameters
as
p_dep_2_param varchar2(1000);
p_loc_1_param varchar2(1000);
p_where_clause varchar2(1000);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
create or replace package body bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
p_where_clause := ' ';
if p_dep_2_param is not null then
if instr(p_dep_2_param,',')>0 then
p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
else
p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
end if;
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
end if;
end if;
else
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
end if;
end if;
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
Regards
Rainer -
How to use Multiple selection in ADF faces
i i would like to know how to use an multiple selection (ADF select many choice) to update the database.
Hi,
Timo is correct that there is no automated way for doing this. You can access the select many selection from a managed bean either accessing the ADF binding layer or by referencing a managed bean array property. So the use case is important. Use case would include the database attribute type to update
Frank -
hi
I want to display a report with Multiple Select List like
http://apex.oracle.com/pls/apex/f?p=267:16:
Thanks
Edited by: 805629 on Jan 6, 2011 9:28 PMDid you ever get this answered???
This is exactly what I am looking for!
Maybe you are looking for
-
IPod touch 2nd Gen 8gb will no longer Sync photos.
all the posts I could find that were similar had to do with ipods that were jailbroken and on Windows. I have iTunes 10.1, iPhoto 6.0.6. running on OSX 10.6.5 iPod Touch 2nd Gen 8GB OS 4.2.1 The Problem: Since I got 4.0 and later, I have not been abl
-
Hi there can any1 pls help..??
i have an ipod 2g 8g, it no-longer connects to itunes & also is not recognized when connected in the usb port. I have tried many times to reset the device by pressing & holding the home & power button.. No app's are displayed on the screen it just di
-
Flashing finder icon and showing "don't restore windows" and "restore windows" text box
hi, i hav problem with the flashing finder icon and showing "don't restore windows" and "restore windows" text box. im using macbookpro MAC OS X 10.7.5. i've search for solutions, lik relaunch the finder by pressing COMMAND+ALT+esc, but it didn't wor
-
Firewall-config cannot change firewall zones of NetworkManager conns
I have been playing around with firewalld and firewall-config recently to try to harden up my laptop. My regular user account is in group wheel, and I have polkit set up. So, any administrative tasks prompt me for my password. I can configure netwo
-
Can I play keynote back on pc laptop somehow that it is just like on my mac
I have an imac but use my pc laptop to do presentations in peoples homes. how do i make a great keynote presentation and playback on pc identically as to the keynote. I know you can convert back to the microsoft version but please help?