How to add a dynamic where clause for a sql based VO with group by query?
Hi,
Here is my case, I have a sql query based VO with the query like "select status, count(*) StatusCount from my_table group by status". Now I used the following java code trying to dynamically add the where clause to my VO to filter the rows based the type attribute in my DB table.
vo.setWhereClause("type='MyType1' ");
vo.executeQuery();
Then I got the sql syntax error. Looks like the ADF has added the where clause to the end of my sql so my sql becomes "select status, count(*) StatusCount from my_table group by status where type='MyType1' ". But what I expected was the correct syntax "select status, count(*) StatusCount from my_table where type='MyType1' group by status".
Does anyone know if this is an ADF bug? Or is there any other way to achieve my goal?
Thanks,
Chunyang
Edited by: Chunyang on Dec 13, 2012 9:09 PM
Hi,
When you use setWhereClause on the VO, it is applied on top of the VO query. I.e, assume your VO has the following query.
select empno, ename from empNow, if you apply the where clause programatically, only the two attributes that you are using in the select statement could be used. I.e
select * from (select empno, ename from emp) where ename='KING' - VALID
select * from (select empno, ename from emp) where deptno=10 - INVALID (because the inner query - the one you've defined as query for your vo does not have deptno attribute selected)If you would need to set a dynamic where clause, you need to make them available in your select statement / use bind variables.
-Arun
Similar Messages
-
Dynamic WHERE clause logic in SQL based on ITEM value
Hi,
I have a report based on following SQL query.
select dept_no,
dept_name,
dept_loc
from dept
where dept_loc = :P1_DEPT_LOC
// If P1_DEPT_LOC is not null, I want the WHERE clause and IF P1_DEPT_LOC is null, then I don't need the WHERE clause.
// how can I build this logic in same SQLThanks,
Deepak
Edited by: Deepak_J on Mar 11, 2010 4:37 PMDeepak,
If p1_dept_loc were a LOV, this would work.
SELECT deptno,
dname,
loc
FROM dept
WHERE ( :p1_dept_loc = '%null%' OR loc LIKE '%' || :p1_dept_loc || '%' )
Jeff -
ADF dynamic where clause for VO query using BC
I'm hoping someone can help me out. I have a read only view object that I want to filter results based on some user choices. For example the user may want to see all results or they may only want to see a much smaller subset. This is for an error dashboard, the smaller subset maybe by application or maybe by application and by error severity. I think I can use a dynamic where clause but I'm not sure, Can someone get me started down the right path, or post an example that I can see.
Hi user,
You can use a dynamic where clause for this, but maybe there is a more practical option. Maybe you can have a fixed where clause, but using a bind parameter, like:
vo.application like :applicationParam. This makes an executeWithParams method available that you can call from your page, and use in the bindings. This parameter you can populate with the results of for example a poplist, with a default value of '%'.
When you do want to use a dynamic where clause, you will need to add a method to the java code of your application module, and make this method available for the client. In this method, you can use findViewObject to retrieve your VO, use VO.setWhereClause to set the whereclause to what you want, and then call VO.executeQuery. This method can then again be called from the page.
Success,
Jeroen van Veldhuizen -
Dynamic where clause for MULTIPLE values
In the following of dynamic where clause?
i have some somewhat different problem.
Is a dynamic where clause for multiple values possible?
If the inputvariable varCode1,varCode2,varCode3,varCode4 are 0 then show all id's otherwise filter the resultset on var1 and/or var2,and/or var3,and/or var4.
Example table:
create table t
(d int,var int);
insert into t values (1 ,1 );
insert into t values (2 ,1 );
insert into t values (3 ,2 );
insert into t values (4 ,3 );
insert into t values (5 ,4 );
insert into t values (6 ,4 );
insert into t values (7 ,4 );
insert into t values (8 ,4 );
insert into t values (9 ,5 );
insert into t values (10, 6);
insert into t values (11, 6);
So what i want to change the where clause upon the value of the varCodes. If var1 and var are not 0 a "AND" should be used otherwise an "OR"
select id
from tst
where var = DECODE( :varCode1, 0, var, :varCode1)
or/and(?) DECODE( :varCode2, 0, var, :varCode2)
or DECODE( :varCode3, 0, var, :varCode3)
or DECODE( :varCode4, 0, var, :varCode4)Please turn off your Caps Lock
and try this link
Dynamic WHERE clause -
Dynamic where clause for generated reports (designer 6.0)
Hi,
I'd like to include dynamic where clause into my reports. It's easy with report builder by using bind parameter in a query where clause (¶m where param is a parameter in which you fill a VARACHAR2 to complete default where clause).
Problem with designer 6.0 report generator is that he failed while trying to parse the query statement he contructs if there is a bind parameter within.
How can I manage this problem ?
Thanks for answers
RomainHi Divya,
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no P_WHERE_CLAUSE= '||Where_Clause);Instead of using SET_REPORT_OBJECT_PROPERTY built in try using ADD_PARAMETER built in which
adds parameters to a parameter list. Each parameter consists of a key, its type, and an associated value.
v_rep := RUN_REPORT_OBJECT(repid); and instead of using RUN_REPORT_OBJECT try using RUN_PRODUCT.
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
Where_Clause Varchar2(4000) := null ;
*Pl_Id ParamList;*
*Pl_Name VARCHAR2(10) := 'param_list';*
BEGIN
Where_Clause := 'Where '||Create_Where_Clause();
message(Where_Clause);
message(' ');
pl_id := Get_Parameter_List(pl_name);
IF not Id_Null(pl_id) THEN
Destroy_Parameter_List(pl_id);
END IF;
pl_id := Create_Parameter_List(pl_name);
Add_Parameter(pl_id,'P_WHERE_CLAUSE', TEXT_PARAMETER, WHERE_CLAUSE);
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
-- Add_Parameter(pl_id,'ANY_OTHER_PARAMETER', TEXT_PARAMETER, 'VALUE FOR OTHER PARAMETER');
RUN_PRODUCT(REPORTS,'REPORT_NAME', ASYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
END;Also you can add as many User created or System parameters as you want using add_parameter. Updated the code to add PARAMFORM parameter.
Best Regards
Arif Khadas
Edited by: Arif Khadas on Mar 15, 2011 9:31 AM -
How do I modify the WHERE clause in my SQL query?
This seems like such a straight-forward part of the report design, but I'm fairly new to Crystal Reports and I only have experience with modifying reports someone else has already written. In this particular case, I just need to modify the WHERE clause of the SQL query. I can select Show SQL Query and see what statement is being used to select data, but I can't find where to modify it since it's grayed out. I see how to change the selection criteria, parameters, grouping, etc...just not the WHERE clause. The report is linked to a database used for reporting with a table created and populated by a stored procedure. I don't need to modify the stored procedure because the data I want to filter by is currently in the table--I just don't know how to filter by what I need. Here's part of the query:
SELECT "rpt_dist"."startdate", "rpt_dist"."transtype", "rpt_dist"."laborcode", "rpt_dist"."crewid", "rpt_dist"."regularhrs" FROM "Reporting"."dbo"."rpt_dist" "rpt_dist"
WHERE (rpt_dist."transtype" <> 'WORK' AND rpt_dist."transtype" <> 'WMATL') AND rpt_dist."laborcode" LIKE 'S%' AND (rpt_dist."crewid" = 'HOUS' OR rpt_dist."crewid" = 'HOUS2' ...
I would like to add another crewid to the WHERE clause. Thanks for any input.1.Open the report in the crystal designer
2.Go to the field explorer(if hidden go to view menu->field explorer)
3.Rt. click on the database fields->choose database expert
4.Now you will see 2 columns-Available DataSource and Selected Tables
5.Rt. click on the object(ex.command) available in the Selected Tables column->Choose Edit command
6.A new Modify Command window will appear,here you can edit your SQL Query
I get to step 4 and I see the two columns including my database and the report table, but there is no command object available. If I right-click on my table, I can just view the Properties. ??
As for the other tip to modify the record selection: I don't see anywhere the other crewid values are set and if I add the one I'm missing, it doesn't modify the existing SQL Query and when I preview the report it throws off the results so that no data displays??
I'm using Crystal Reports 11.5 if that makes a difference. Thanks again. -
Dynamic where clause for cursor
Hi Friends,
I have a stored procedure with a single input parameter where in the input comes as
a string of values (ex: EMPLOYEE NAMES) separated by commas. I use this parameter in my cursor query
and my requirement is like when the parameter is NULL the query has to run for ALL the employees but if
its not, it has to run for the EMPLOYEE NAMES passed as the input parameter.
What are the possible and apt solutions for this requirement ?
Should I go for dynamic sql or do I have any other optimal solutions?
Please advice me.
Thanks
ZaraDear,
I have a stored procedure with a single input parameter where in the input comes as
a string of values (ex: *EMPLOYEE NAMES*) separated by commas. I use this parameter in my cursor query
and my requirement is like when the parameter is NULL the query has to run for ALL the employees but if
its not, it has to run for the EMPLOYEE NAMES passed as the input parameter.
What are the possible and apt solutions for this requirement ?
Should I go for dynamic sql or do I have any other optimal solutions?
Please advice me.I would suggest you to let down this dynamic SQL and those concatenations that are going to introduce a threat of SQL injection and non shared code into your application.
And, as far as you've opted for a stored procedure I want to suggest you to use
(a) stored procedure in wich only static SQL is used
(b) if point (a) is respected then you don't have to care about using litteral inside your stored procedure. All what you will do in this procedure will be 'auto-binded'; that is PL/SQL (static).
(c) However, make sure to call your stored procedure using bind variables; otherwise your shared pool (v$sql) will be full of hundred and thousands of calls to your stored procedure.
Best Regards
Mohamed Houri -
How to add a dynamic saerch help for a standard field
Hi,
As per my requirement I need to add a search help to a Satndard Field in PO.
The search help is dyanimc.
CAn anyone suggest how can we achieve this functionality.
The values to be selected are stored in some Z table.
Smriti.Ya,But In my case the value which is being displayed in the search help will depend on the value of werks being enterd in the PO.Taking the PO the Ztable will be queried and from there The value of unloading point will be calculated and displayed.
So only adding the search help to the standard field will not help. -
How to set dynamic WHERE clause to VO from backingBean?
Hi,
Can any one let me know the best way to add the dynamic WHERE clause in to VO query.
I have created AM (with AMImpl.java) & VO (with VOImpl.java & VORowImpl.java) in my model project. I suppose to set the WHERE condition at runtime while the user click the search button. I am handling the user button click at UI layer backingBean. From the backing bean I could able to get the objct of the VO and set the where clause by below code.
ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings.UserSearchVO1Iterator}", Object.class);
DCIteratorBinding dcIter = (DCIteratorBinding)valueExp.getValue(elContext);
ViewObject userSearchVO = dcIter.getViewObject();
userSearchVO.setWhereClause("lower(usr_login) LIKE ':1' and usr_udf_suid like ':2' ");
userSearchVO.executeQuery();But as I fear this is not the right way to do it. So I am creating the cutom method inside the VOImpl.java and triggring that method by creating one more cutom method in AMImpl.java. But I dont know how to invoke this AM method from backingBean.
AMImpl method
public void initDetails()
UserSearchVOImpl vo = getUserSearchVO1();
vo.initQuery();
VOImpl method
public void initQuery()
setWhereClause("lower(usr_login) LIKE 'a%' and usr_udf_suid like '%1144%'");
executeQuery();
}Can any one guide me which is the best way to set the where clause to VO? How to call the AM method from backingBean?
Thanks
klni am new to oracle 11g i writing a stored procedure in which i have made use of case in where clause to pass my parameter value v_toStoreID
i have googled a lot regarding that i found that to use case in where clause it should be like this
where
case column_value
when 0
then value1
else
value2
end
this my query
SELECT ITMID as ItemId,
NVL(OrderDtl.PackageID, 0) PackageId,
OrderDtl.OrdDtlID,
(CASE NVL(OrderDtl.PackageID, 0)
WHEN 0
THEN 1
ELSE 0
END) as PackageFlag,
ivitem.Code ItemCode,
ivitem.ITMNAME AS itemName,
IvPatientIssueMst.IssueNo Issue_No,
to_char(Issuedate, 'DD/MM/YYYY') IssueDate,
OrderDtl.OrdQty,
NVL(OrderDtl.AllocationID, 0) Package,
OrderDtl.ServiceAmount MRP
FROM IvPatientIssueMst
JOIN OrderMst
ON IvPatientIssueMst.OrderId = OrderMst.OrdId
JOIN OrderDtl
ON OrderDtl.OrdID = OrderMst.OrdId
JOIN ivitem
ON ivitem.ITMID = OrderDtl.DrugId
LEFT JOIN IVPatientIndentMst
ON IVPatientIndentMst.IndentID = IvPatientIssueMst.IndentId
WHERE OrderMst.OrdVisitID = 395899
AND
*(CASE IvPatientIssueMst.StoreId*
when NVL(IvPatientIssueMst.StoreId, 0)=0
THEN v_toStoreID
ELSE IVPatientIndentMst.ToStoreID
END)
ORDER BY ivitem.ITMNAME;
it is not working please someone help -
Dynamic IF statement...like dynamic where clause...
Hi,
I know how to do a dynamic where clause by putting (varname) like shown below -
select * from cust_mstr where (varname).
Can I do it something like this in IF statement.
if (varname).
endif.
The varname will have different conditions.
Your help will be greately appreciated.
Regards,
SumeHello Sume,
I would try to use an approach using ranges:
DATA:
gv_material TYPE matnr.
gv_material = '292-392-392-202'.
IF gv_material = '292-392-392-202'.
WRITE: / `Static check:`, gv_material, `matches!`.
ELSE.
WRITE: / `Static check:`, gv_material, `doesn't match!`.
ENDIF.
PERFORM dynamic_check
USING
gv_material
'I'
'EQ'
'292-392-392-202'
space.
PERFORM dynamic_check
USING
gv_material
'I'
'CP'
'*292*'
space.
PERFORM dynamic_check
USING
gv_material
'I'
'CP'
'*ABC*'
space.
*& Form dynamic_check
FORM dynamic_check USING pv_value TYPE clike
pv_sign TYPE ddsign
pv_option TYPE ddoption
pv_low TYPE string
pv_high TYPE string.
DATA lr_range TYPE RANGE OF string.
DATA ls_range LIKE LINE OF lr_range.
ls_range-sign = pv_sign.
ls_range-option = pv_option.
ls_range-low = pv_low.
ls_range-high = pv_high.
APPEND ls_range TO lr_range.
IF pv_value IN lr_range.
WRITE: / `Dynamic check matches: `, pv_value, ls_range-sign, ls_range-option, ls_range-low, ls_range-high.
ELSE.
WRITE: / `Dynamic check doesn't match:`, pv_value, ls_range-sign, ls_range-option, ls_range-low, ls_range-high.
ENDIF.
ENDFORM. "dynamic_check
For values of SIGN and OPTION check the values of the domains used in the data elements of the parameters of form dynamic_check.
Output is like:
Static check: 292-392-392-202 matches!
Dynamic check matches: 292-392-392-202 I EQ 292-392-392-202
Dynamic check matches: 292-392-392-202 I CP *292*
Dynamic check doesn't match: 292-392-392-202 I CP *ABC*
Edited by: Alejiandro Sensejl on Aug 11, 2010 8:23 PM:
Unfortunately I don't know why the code-tag isn't working, I sent a mail to SCN tech-team about this... Sorry, but you have to copy the code somehow to have a look at it -
How to construct dynamic WHERE clause in our sqr programming ?
In my run control table I am having parameters fromdate, thrudate [mandatory parameters] and location as [Optional Parameter] how can I declare dynamic where clause to achieve this could any one help me with coding ? Here is my sample coding
Begin-Procedure Main
if $prcs_process_instance=' '
do askvalues
else
do getvalues
end-if
End_Procedure Main
Begin-Procedure askvalues
input $frmdate 'Enter From Id' type=text format=number !Mandatory Parameter
input $todate 'Enter To Id' type=text format=number !Mandatory Parameter
input $loc 'Enter Location' value=text !Optional Parameter
End-Procedure
Begin-Procedure getvalues
Begin-Select
FROMDATE
THRUDATE
SQR_LOCATION
let $frmdate=&FROMDATE
let $todate=&THRUDATE
let $loc=&SQR_LOCATION
let where=-------------------------- ?
FROM
PS_PROCESS_TBL WHERE OPRID=$PRCS_OPRID AND RUN_CNTL_ID=$PRCS_RUN_CNTL_ID
End-Select
End-Procedure getvalues
Begin-Procedure selectall
BEGIN-SELECT
SQR_EMPLID
SQR_FNAME
SQR_LNAME
SALARY
FROM
PS_SQR_FIRST_TBL WHERE SQREMPID BETWEEN $frmdate AND $todate
END-SELECT
End-Procedure selectallSQR will understand Where Clause as dynamic, when you include it in Square Brackets []
In your case, since fromdate & thrudate are mandatory values, I would code like this
let $frmdate=&FROMDATE
let $todate=&THRUDATE
let $loc=&SQR_LOCATION
let $Where_Clause = 'SQREMPID BETWEEN' || ' ' || $frmdate || ' ' || 'AND' || ' ' ||$todate
if $loc != ''
let $Where_Clause = $Where_Clause || ' '|| 'AND' || ' ' || 'LOCATION = ' || $loc
end-if
Now you can use this Dynamic Where Clause in which procedure you want. Only thing is you need to encode the where clause with brackets([$Where_Clause])
Edited by: 935179 on Sep 6, 2012 2:11 AM -
Region Source - Dynamic Where Clause
I cannot find anyway to call a function to dynamically generate a where clause for a SQL Query for the region source. For a given set of html text input types. The where clause builds is build based on the populated values of the textfields, if they are null then it excludes it from the where clause.
For example:
Select a,b,c,d,e,f
from tablename
where function_build_where(&CUSTOMER_NAME., &POSTCODE., &FNAME.)
I keep on getting an invalid relational operator.
If I execute the function directly it returns the correct statement that I want.
Any help will be great
Thanks
GraemeLosing my marbles !
I am really stuck here. It makes sense but I cannot get this to work. I have written a very basic example. I keep getting this error message:
ORA-06550: line 5, column 1: PLS-00372: In a procedure, RETURN statement cannot contain an expression ORA-06550: line 5, column 1: PL/SQL: Statement ignored
Debug:
1: begin
2: declare
3: q varchar2(2000) := '';
4: begin
5: q:= 'select PB_ID, PB_NAME from PB';
6: return q;
7: end;
8: end;
Seems like apex wraps a begin end.
Here is the code:
declare
q varchar2(2000) := '';
begin
q:= 'select PB_ID, PB_NAME from PB';
return q;
end;
Is there a way to simply just call a pl/sql function or sp?
e.g. Region Source = GetPBData()
Using dynamic PL/SQL opens up another can of worms as one cannot pre-format any fields, does this mean one has to use the API to control the length of columns etc.
Many thanks
Regards
Graeme -
Where clause for TaskLOVVO on OTL Timecard
Hi,
Following is the customization on our OTL timecard layout(Projects and Payroll Layout):
->Extended TaskLOVVO and based on a value selected in TaskLOV, i am defaulting Hours type.
The dynamic where clause for the TaskLOVO is taken care of by the below QUALIFIER_ATTRIBUTES(Same as seeded layout)
QUALIFIER_ATTRIBUTE14 = "HxcCuiTaskProjectId|PROJECT|Y#HxcCuiTaskProjectNumber|PROJECT-DISPLAY|Y"
QUALIFIER_ATTRIBUTE15 = "project_id = ::HxcCuiTaskProjectId#upper(project_number) = upper(::HxcCuiTaskProjectNumber)"
But in some scenarios the dynamic layout is not getting appended to TaskLOVO and the query behind the TaskLOV is pulling too many records.
This issue is happening on Fridays when around 15000 employees submit the timecards, as Friday is our deadline for Timecard submission.
I have tried different scenarios to replicate this issue in test intances but I am not able to replicate it.
Please suggest what could be the issue and why is the whereclause is not getting appended in some scenarios.
Thank youHi,
Thank you for your reply.
The whoole LDT file is more than 30000 characters, which is not allowed in the post, so I have included only the lines which have customization.
FYI: This is a Projects and Payroll layout.
Following is my LDT file:
# $Header: hxczzhxclayt0093.ldt 120.0 2008/02/08 09:26:10 bbayragi noship $
# dbdrv: exec fnd bin FNDLOAD bin &phase=dat+10 checkfile:~PROD:~PATH:~FILE &ui_apps 0 Y UPLOAD @HXC:patch/115/import/hxclaytlayoutsld.lct @~PROD:~PATH/~FILE
LANGUAGE = "US"
LDRCONFIG = "hxclaytlayoutsld.lct 120.0"
#Source Database seed121
#RELEASE_NAME 12.1.0
# -- Begin Entity Definitions --
BEGIN HXC_LAYOUT_COMPONENTS
"Projects Details Alternate Timecard Layout - Project"
OWNER = "ORACLE12.1.0"
COMPONENT_VALUE = "PROJECT"
REGION_CODE = "HXC_CUI_TIMECARD"
REGION_CODE_APP_SHORT_NAME = "HXC"
ATTRIBUTE_CODE = "HXC_TIMECARD_PROJECT"
ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
SEQUENCE = "200"
COMPONENT_DEFINITION = "LOV"
RENDER_TYPE = "WEB"
PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
LAST_UPDATE_DATE = "2004/05/24"
BEGIN HXC_LAYOUT_COMP_QUALIFIERS
"Projects Details Alternate Timecard Layout - Project"
OWNER = "ORACLE12.1.0"
QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"
QUALIFIER_ATTRIBUTE1 = "ProjectLOVVO"
QUALIFIER_ATTRIBUTE2 = "N"
QUALIFIER_ATTRIBUTE3 = "HXC_CUI_PROJECT_DETAILS_LOV"
QUALIFIER_ATTRIBUTE4 = "809"
QUALIFIER_ATTRIBUTE5 = "25"
QUALIFIER_ATTRIBUTE6 = "HxcCuiProjectDetails|PROJECT-DISPLAY|CRITERIA|N|HxcCuiProjectId|PROJECT|RESULT|N|HxcCuiProjectDetails|PROJECT-DISPLAY|RESULT|N|HxcCuiProjectCoOrgId|LOCATION1|RESULT|N|HxcCuiProjectName|CNAME|RESULT|N"
QUALIFIER_ATTRIBUTE8 = "ProjectDetails"
QUALIFIER_ATTRIBUTE9 = "ProjectId#NUMBER"
QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.ProjectLOVVO"
QUALIFIER_ATTRIBUTE11 = "RESOURCE_IDENTIFIER_ID"
QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
QUALIFIER_ATTRIBUTE20 = "N"
QUALIFIER_ATTRIBUTE21 = "Y"
QUALIFIER_ATTRIBUTE22 = "L"
QUALIFIER_ATTRIBUTE25 = "FLEX"
QUALIFIER_ATTRIBUTE26 = "PROJECTS"
QUALIFIER_ATTRIBUTE27 = "Attribute1"
QUALIFIER_ATTRIBUTE28 = "PROJECT"
LAST_UPDATE_DATE = "2004/05/24"
END HXC_LAYOUT_COMP_QUALIFIERS
END HXC_LAYOUT_COMPONENTS
BEGIN HXC_LAYOUT_COMPONENTS
"Projects Details Alternate Timecard Layout - Task"
OWNER = "ORACLE12.1.0"
COMPONENT_VALUE = "TASK"
REGION_CODE = "HXC_CUI_TIMECARD"
REGION_CODE_APP_SHORT_NAME = "HXC"
ATTRIBUTE_CODE = "HXC_TIMECARD_TASK"
ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
SEQUENCE = "210"
COMPONENT_DEFINITION = "LOV"
RENDER_TYPE = "WEB"
PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
LAST_UPDATE_DATE = "2004/05/24"
BEGIN HXC_LAYOUT_COMP_PROMPTS "HxcCuiTaskProjectId" "AK_PROMPT"
OWNER = "ORACLE12.1.0"
REGION_CODE = "HXC_CUI_TIMECARD"
REGION_APP_SHORT_NAME = "HXC"
ATTRIBUTE_CODE = "HXC_TIMECARD_PROJECT"
ATTRIBUTE_APP_SHORT_NAME = "HXC"
LAST_UPDATE_DATE = "2004/05/24"
END HXC_LAYOUT_COMP_PROMPTS
BEGIN HXC_LAYOUT_COMP_QUALIFIERS
"Projects Details Alternate Timecard Layout - Task"
OWNER = "ORACLE12.1.0"
QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"
QUALIFIER_ATTRIBUTE1 = "TaskLOVVO"
QUALIFIER_ATTRIBUTE2 = "N"
QUALIFIER_ATTRIBUTE3 = "HXC_CUI_TASK_DETAILS_LOV"
QUALIFIER_ATTRIBUTE4 = "809"
QUALIFIER_ATTRIBUTE5 = "10"
QUALIFIER_ATTRIBUTE6 = "HxcCuiTaskDetails|TASK-DISPLAY|CRITERIA|N|HxcCuiTaskProjectId|PROJECT|PASSIVE_CRITERIA|Y|HxcCuiTaskId|TASK|RESULT|N|HxcCuiTaskDetails|TASK-DISPLAY|RESULT|N|HxcCuiTaskBillableFlag|EXPTYPE|RESULT|N"
QUALIFIER_ATTRIBUTE8 = "TaskDetails"
QUALIFIER_ATTRIBUTE9 = "TaskId#NUMBER"
QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.TaskLOVVO"
QUALIFIER_ATTRIBUTE11 = "RESOURCE_IDENTIFIER_ID|TIMECARD_BIND_END_DATE"
QUALIFIER_ATTRIBUTE14 = "HxcCuiTaskProjectId|PROJECT|Y#HxcCuiTaskProjectNumber|PROJECT-DISPLAY|Y"
QUALIFIER_ATTRIBUTE15 = "project_id = ::HxcCuiTaskProjectId#upper(project_number) = upper(::HxcCuiTaskProjectNumber)"
QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
QUALIFIER_ATTRIBUTE20 = "N"
QUALIFIER_ATTRIBUTE21 = "Y"
QUALIFIER_ATTRIBUTE22 = "L"
QUALIFIER_ATTRIBUTE25 = "FLEX"
QUALIFIER_ATTRIBUTE26 = "PROJECTS"
QUALIFIER_ATTRIBUTE27 = "Attribute2"
QUALIFIER_ATTRIBUTE28 = "TASK"
LAST_UPDATE_DATE = "2004/05/24"
END HXC_LAYOUT_COMP_QUALIFIERS
END HXC_LAYOUT_COMPONENTS
BEGIN HXC_LAYOUT_COMPONENTS
"Projects Details Alternate Timecard Layout - Location"
OWNER = "CUSTOM"
COMPONENT_VALUE = "LOCATION"
REGION_CODE = "HXC_CUI_TIMECARD"
REGION_CODE_APP_SHORT_NAME = "HXC"
ATTRIBUTE_CODE = "HXC_CUI_LOCATION_LABEL"
ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
SEQUENCE = "215"
COMPONENT_DEFINITION = "CHOICE_LIST"
RENDER_TYPE = "WEB"
PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
LAST_UPDATE_DATE = "2004/05/24"
BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Location"
OWNER = "CUSTOM"
QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
QUALIFIER_ATTRIBUTE1 = "Custom2VO"
QUALIFIER_ATTRIBUTE4 = "N"
# QUALIFIER_ATTRIBUTE5 = "10"
# QUALIFIER_ATTRIBUTE8 = "DisplayValue"
# QUALIFIER_ATTRIBUTE9 = "Value#NUMBER"
QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.Custom2VO"
QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
QUALIFIER_ATTRIBUTE20 = "N"
QUALIFIER_ATTRIBUTE21 = "Y"
QUALIFIER_ATTRIBUTE22 = "L"
QUALIFIER_ATTRIBUTE25 = "FLEX"
QUALIFIER_ATTRIBUTE26 = "Dummy Element Context"
QUALIFIER_ATTRIBUTE27 = "Attribute15"
QUALIFIER_ATTRIBUTE28 = "LOCATION1"
LAST_UPDATE_DATE = "2004/05/24"
END HXC_LAYOUT_COMP_QUALIFIERS
END HXC_LAYOUT_COMPONENTS
BEGIN HXC_LAYOUT_COMPONENTS "Projects Details Alternate Timecard Layout - Expenditure Type"
OWNER = "ORACLE"
COMPONENT_VALUE = "EXPENDITURETYPE"
REGION_CODE = "HXC_CUI_TIMECARD"
REGION_CODE_APP_SHORT_NAME = "HXC"
ATTRIBUTE_CODE = "HXC_TIMECARD_EXPTYPE"
ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
SEQUENCE = "225"
COMPONENT_DEFINITION = "PACKAGE_CHOICE_LIST"
RENDER_TYPE = "WEB"
PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
LAST_UPDATE_DATE = "2004/05/23"
BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Expenditure Type"
OWNER = "ORACLE"
QUALIFIER_ATTRIBUTE_CATEGORY = "PACKAGE_CHOICE_LIST"
QUALIFIER_ATTRIBUTE1 = "BOLINF.XXHXC_TYPE_CHOICE.EXPTTYPE"
QUALIFIER_ATTRIBUTE2 = "@RESOURCE_IDENTIFIER_ID|@TIMECARD_BIND_END_DATE"
QUALIFIER_ATTRIBUTE4 = "N"
QUALIFIER_ATTRIBUTE8 = "aliasname"
QUALIFIER_ATTRIBUTE9 = "value#NUMBER"
QUALIFIER_ATTRIBUTE20 = "N"
QUALIFIER_ATTRIBUTE21 = "Y"
QUALIFIER_ATTRIBUTE22 = "R"
QUALIFIER_ATTRIBUTE24 = "ET_EXPENDITURE_TYPE"
QUALIFIER_ATTRIBUTE25 = "FLEX"
QUALIFIER_ATTRIBUTE26 = "OTL_ALIAS_1"
QUALIFIER_ATTRIBUTE27 = "Attribute1"
QUALIFIER_ATTRIBUTE28 = "EXPTYPE"
LAST_UPDATE_DATE = "2004/05/24"
END HXC_LAYOUT_COMP_QUALIFIERS
END HXC_LAYOUT_COMPONENTS
BEGIN HXC_LAYOUT_COMPONENTS "Projects Details Alternate Timecard Layout - Customer name"
OWNER = "ORACLE"
REGION_CODE = "HXC_CUI_TIMECARD"
REGION_CODE_APP_SHORT_NAME = "HXC"
ATTRIBUTE_CODE = "XXTW_HXC_TIMECARD_CUST_NAME"
ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
SEQUENCE = "205"
COMPONENT_DEFINITION = "TEXT_FIELD"
RENDER_TYPE = "WEB"
PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
LAST_UPDATE_DATE = "2004/05/24"
BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Customer name"
OWNER = "ORACLE"
QUALIFIER_ATTRIBUTE_CATEGORY = "TEXT_FIELD"
QUALIFIER_ATTRIBUTE1 = "N"
QUALIFIER_ATTRIBUTE2 = "Y"
QUALIFIER_ATTRIBUTE3 = "20"
QUALIFIER_ATTRIBUTE4 = "1"
QUALIFIER_ATTRIBUTE5 = "20"
QUALIFIER_ATTRIBUTE7 = "OraTableCellText"
QUALIFIER_ATTRIBUTE17 = "NONE"
QUALIFIER_ATTRIBUTE20 = "Y"
QUALIFIER_ATTRIBUTE21 = "Y"
QUALIFIER_ATTRIBUTE22 = "L"
QUALIFIER_ATTRIBUTE25 = "FLEX"
QUALIFIER_ATTRIBUTE26 = "PROJECTS"
QUALIFIER_ATTRIBUTE27 = "Attribute9"
QUALIFIER_ATTRIBUTE28 = "CNAME"
QUALIFIER_ATTRIBUTE30 = "Y"
LAST_UPDATE_DATE = "2004/05/24"
END HXC_LAYOUT_COMP_QUALIFIERS
END HXC_LAYOUT_COMPONENTS
And the query in TASKLOVVO:
SELECT task.task_number tasknumber, task.task_name, task_details taskdetails, task.task_id taskid, bolinf.GETALIASID(proj.project_type,proj.project_id,task.task_id, :1, :2) billable_flag, task.project_id, task.start_date, task.completion_date, task.chargeable_flag, proj.project_number , proj.project_details from pa_online_tasks_v task ,pa_online_projects_v proj where proj.project_id = task.project_id
In the above query GETALIASID is a custom function that returns a value.
Thank you
Edited by: Santo on Mar 18, 2013 2:12 PM -
How to dynamically update columns in a where clause to a SQL query in OSB?
Hi Gurus,
I have a requirement where in we need to dynamically update a where clause to a SQL query in OSB(11.1.1.6.0).
For example:
If the JCA sql string is "select * from emp where emp_id = 100 and emp_status ='Permanent'" now i want to change this where clause and the new query has to be like "select * from emp where emp_name like 'S%' and emp_dept like 'IT' ". basically we need to change the where clause dynamically.
We can also use "fn-bea:execute-sql()" in a xquery but I don't want to use this function as creates a new connection.
I have done some home work and found out --> as per the DOC "http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/jca.htm#OSBDV943" section: "25.5.2 JCA Transport Configuration for Proxy and Business Services", when a business service is created by using JCA, we can see Interaction Spec Properties under JCA Transport Tab. This will have a property "SqlString' and we can over ride it. But I am unable to figure out how to over ride the value. I have tried by using Transport Headers activity but no luck. Please guide me how to achieve this?
Thanks in advance
SuryaI solved my problem.
In my header renderer, I simply added a line to set the text to the object value "label.setText( (String) value );" (where label is an instance of a JLabel.
Thank you to who took some time to think about it.
Marc -
Dynamic Where Clause - How To?
I need help building a dynamic where clause in 1.6
I have three fields:
p1_col_where which is a static list of 8 columns
p1_condition which is a static list of the 9 possible conditions(=,<,>...)
p1_condition_value is a text field that the user enters the literal they want to use
The lov select I thought would be:
SELECT Description, positem
FROM v_item
WHERE :P1_COL_WHERE :P1_CONDITION :P1_CONDITION_VALUE
I was hoping that this would be resolved to: WHERE item = 123
but of course I get a big NASTY error.
Can someone help me out?
Thanks,
JoeMike,
Thanks for the help.
There's a problem in the docs for creating this popup on step 5. The docs say:
Step 5 - Add the LOV report to the popup page
select ename, job, sal , 'placeholder' the_link
from emp
where ename like '%'||:P2_ENAME||'%'
and (job = :P2_JOB or :P2_JOB is null)
and (sal = :P2_SAL or :P2_SAL is null)
Note that the last column in this query is just a placeholder. once the region is created, turn that placeholder into a link by doing the following:
1. Navigate to the Page Definition for page 2
2. Next to the name of the report region created in step 5, Click Q
3. Next to the column THE_LINK, click the edit icon
4. In the "Link Text" field enter the string "select"
5. In the URL field enter: javascript:passBack('#ENAME#','#JOB#','#SAL#');
6. Click the "Apply Changes" button
The problem is in number 5. There is NO URL field to enter that code. Where does it go?
Also, your alternative method:
IF :P1_COL_WHERE is null then
RETURN 'SELECT Description, positem FROM v_item';
ELSE
RETURN 'SELECT Description, positem FROM v_item '||
' WHERE '||:P1_COL_WHERE||' '||:P1_CONDITION||' '||:P1_CONDITION_VALUE;
END IF;
With a 'GO' button is the method that I was trying. That's what gave me the error when the page loaded.
Any assistance is greatly appreciated.
Thanks,
Joe
Maybe you are looking for
-
After installing reader 9 sucessfully on the imac it won't open and doesn't seem to be there. I do have 5 installed but it won't work on new files. mac 10.6.8.Help.
-
Can't get disk utility to work with leopard - iBook running super slow
I have an iBook G4 and it's running ssuuppeerr slow but I can't get disk utility to come up after I press C down. I don't know if I'm pressing it at the wrong time but I restart with the C pressed and it gets to the apple screen and it won't go anywh
-
The YouTube app that came on my iPad will not log into my account. Is this a known issue? I can log into YouTube on the web just fine. Thanks.
-
Saving pictures directly to Time Capsule
Can someone tell me how I can save my pictures directly to my TC? My picture files are very large so I'd like to store them on my TC as opposed to my laptop and then just grab them on TC when I need to edit. I use iPhoto. Can someone walk me through
-
My Laptop died and I have never pluged Itouch into my PC. How do I sync?
My laptop died and I had all my apps there. How do I setup a sync on my PC without losing all my apps. ITouch 2nd Gen 3.0