Validation in af:query
Dear All,
I have created a af:query by dragging a vo on page, in that i have a createddt field with between clause, and i want the createddt to be mandatory in each search..how can i do it..?
Regards,
Santosh
Component Version
========= =======
ADF Business Components 11.1.1.59.23
Java(TM) Platform 1.6.0_21
Oracle IDE 11.1.1.4.37.59.23
Versioning Support 11.1.1.4.37.59.23
Hi peter,
I have created a view-creteria in vo and just dragged that viewcreteria from datacontrols to page to create querypanel and table.
Is ur createddt field is also coming from the vo u dragged or u added a new field?Yes.
Regards,
Santosh
Similar Messages
-
BC4J List Validation from SQL Query, using parameters?
When adding validation to a business component, one of the options for the list validation rule is 'Query Result'.
is it possible to use parameters??. e.g. for a student type registration application
validation on studentEntry that the course is availabe for the term entered would be like :-
Select course from courseCat where term = :pterm
where :pterm is the current term that the student has entered, this exists on the current studentEntry row.
how would I code the parameter in the select statement in 'edit validation rule' screen?When adding validation to a business component, one of the options for the list validation rule is 'Query Result'.
is it possible to use parameters??. e.g. for a student type registration application
validation on studentEntry that the course is availabe for the term entered would be like :-
Select course from courseCat where term = :pterm
where :pterm is the current term that the student has entered, this exists on the current studentEntry row.
how would I code the parameter in the select statement in 'edit validation rule' screen? This is currently not available on the built in validators. However you can create a custom-validation rule and perform such bind params and execute queries. We do have plans to support named paramters in queries that will allow us to enable this feature on validators as well. -
Create a validation for SQL Query (updateable report)
Hello
I have a need for creating a validation on a SQL Query (updateable report)- type region
1)
When a row get populated i don't want same values to be populated in the second row.(as shown in first 2 rows)
Also, I don't want to have a value that falls in range in between 100 and 1000 for the period falls in the previous. (as shown in third row)
i.e
Type_id
Lower_Limit Upper_Limit Date_From Date _To
1
100 1000 1/1/2013 12/31/2013
2
100 1000 1/1/2013 12/31/2013
3
101 500 2/1/2013 10/31/2013
appreciate any help
thanks
kpThis example could help:
http://apex.oracle.com/pls/otn/f?p=31517:214
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Small Validation in sql Query Date range..
hi.
I need Some suggestions for validating the Date.
In customization form From date and to date i given.
like
01/08/2014 and 30/08/2014..
Second time if they give...
i can validate like below
select DocEntry from [@PR_OTIMESHEET] where U_frmdate >='20140801' and U_todate <='20140830'
It's fine everything is fine. but.
if i give like from date 15/08/2014 and 30/08/2014 it should be validate and stop it..
if i run the above query by replace the dates it is not working..
Simply.
Date is 200 to 300 if they give first time it will be save in db.
second time if i give 150 to 400 it should not accept bcz 150 all ready comes between 200 to 300
How can i restrict it.Hi,
If your question is related to SDK, please post it there.
Thanks,
Gordon -
"AstService namespace is not valid" error when querying CCM 4.1 when Axis
Hi,
I'm trying to query a CCM with the Axis Java Soap API and I'm receiving a Fault response saying "AstService namespace is not valid"
I have tried with SAAJ API from Sun (similar to Axis) and it works fine.
What's wrong ?
Thanks
SebCould you trace the soap exchange and post it here? You obviously have a namespace issue.. also, the code how you set up your service endpoint might be of use, too. I have AXL working via AXIS (but I'm using handwritten XML since AXL just doesn't work without hacking WSDLs and I have better things to do than worry about breaking apps when installing a ccm patch) so we could compare the code.
-
Should LOV be valid when beforming query ?
Dear All,
am using Jdeveloper 11.1.1.3 , and i have an jsf page (master detail ) and in that page user can enter new data or query for an existing data ,,
when entering a new data the LOV will bring u the data filtered on certain criteria ( lets say in case of employees ,the LOV should bring u only active employees ) , the problem occur when trying to perform query depending on a a value that is not in the LOV List ( lets say that i tried to query for a resigned employee) the page will give me : Error: Invalid value: 1000500160. when entering an invalid value in the input text ( emp no )
wish that am clear,
regardsbut in the first approach i'll loose the validation that is fired while the insertion right?Yes, you will lose the validation performed by the LOV, but you can implement a "key-exist" validator at the Entity or Entity attribute level. (Our team never rely on the validation at the UI, we always define validators at the business components level, which is redundant sometimes). This validator will execute only in cases of real data entry and not when entering a query condition. In this way you will have reliable validation and the LOV will not fire unwanted error messages. The main disadvantage of an eventual removal of the <tt><f:validator></tt> tag is that if the user enters a partial value in the text field then the LOV will not automatically open and filter the possible choices.
-
APEX validations in updateable reports built on a PL/SQL query
Sorry if the question is not clear (english is not my mother language) or if the answer already exists on the forum (I have not been able to find it).
I build a report on a PL/SQL function query.
In this PL/SQL query i use apex_item.checkboxes or texts to let the end user change/enter some new data.
As i need to do some validations on the user entries, i have already used some events (e.g. onChange) that trigger
simple javascript validations checking if data is numeric or length of data entered....
But i would like to use also the standard validations of APEX to make some more complex validations (e.g. checking coherency) on
many data entered by the end user.
I am trying to build a PL/SQL to loop through the report lines through a checkbox item i have added
but the process of debugging is awfull for me.
- Is there a pointer to a code example of validations within a query report that would help me in achieving this validation
- or could someone give me some clue on how to acess these report data in the interface.
Thanks in advance,
DanielDaniel:
You can check out Denes Kubicek's APEX demo site for ideas on how to create validations for a tabular form.
http://htmldb.oracle.com/pls/otn/f?p=31517:41:3322496527336906:::RP,::
Varad -
Af:query validation?
Hello,
I want to handle client side validation for one of the query criteria rendered inside af:query component , checking that operator can not null
but there is no such thing as validator on af:query component
No , such method addValidator/ setValidator to add custom validator
Is there any way to do this or its not possible?
thank younot a big fan of doing following everytime..., but it works
so, I have one commandButton, performing some action and I want to validate filter operators for not null
RichQuery is associated with backing bean
unfortunately, you will get hold of the components once the af:Query is Fully Rendered , which is what happening in this case
public void checkForValidation(ActionEvent event){
List<UIComponent> richQueryComponents = richQuery.getChildren();
RichPanelGroupLayout richQueryPanelGroupLayout = (RichPanelGroupLayout) richQueryComponents.get(0);
List<UIComponent> richQueryPanelGroupLayoutComps = richQueryPanelGroupLayout.getChildren();
for(int i=1;i<richQueryPanelGroupLayoutComps.size();i++) {
Application application = FacesContext.getCurrentInstance().getApplication();
RichPanelLabelAndMessage panelLabelAndMessage = (RichPanelLabelAndMessage) richQueryPanelGroupLayoutComps.get(i);
RichSelectOneChoice operSelectOneChoice = (RichSelectOneChoice) panelLabelAndMessage.getChildren().get(1);
operSelectOneChoice.setAutoSubmit(true);
application.addValidator("OperatorValidator","com.simplyadf.OperatorValidator");
Validator validator = application.createValidator("OperatorValidator");
MethodBinding methodBindingExpression= FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{pageFlowScope.myBackingBean.filterOperValueChanged}",new Class[]{ValueChangeEvent.class});
operSelectOneChoice.setValueChangeListener(methodBindingExpression);
operSelectOneChoice.addValidator(validator);
operSelectOneChoice.validate(FacesContext.getCurrentInstance());
}Version : JDev11gUpdate2
Component : af:Query
regards, -
I have a query panel in which i have a field from date and to date
I have defined view criteria taking an attribute date and giving the between operator so i got this from and to date fields
Now i want to do the validation that from date should not be greater than to date and throw an error msg
How can we define validation for this query panel field
This is a read only vo which is based on multiple tables having a join conditionthis will help you
Re: validation in af:query
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/85-querycomponent-fieldvalidation-427197.pdf
Edited by: in the line of fire on Jul 11, 2011 5:24 PM -
Flash Chart Series : SQL Query Validation
Hello,
I probably found a bug on the SQL Query Validation for Flash Charts, if I have two subqueries, the validation fails:
SQL Query example:
SELECT NULL, a, b
FROM (SELECT c a, d b FROM
( SELECT 'first' c, 2 d FROM DUAL))
Error returned:
"Failed to parse SQL query:
ORA-06550: line 1, column 45: PLS-00428: an INTO clause is expected in this SELECT statement"
Is this problem known or is there just something that I do wrong ?
ChristopheYes it was that problem, but I still have an issue:
How do I set the Flash Chart to use a PL/SQL function in the first place ?
When I try to enter:
"return package.function;" in the Create Region Wizard, I get the following error:
Failed to parse SQL query:
return EXPERT.getFullListSQLByNC
ORA-00900: invalid SQL statement
Certain queries can only be executed when running your application, if your query appears syntactically correct, you can save your query without validation (see options below query source). -
Infotype 0120 - changes in adhoc query program
Hi All,
I have to make some code changes for the std infotype 0102 - Grievances NA in the adhoc query. My requirement is :-
1) A range from 000-999 should be available for each Employee for the Grievance Number field. P0102-GRNUM.
2) If a record already exists for the employee for a particular Grievance Number -GRNUM(e.g - 467) and Stage- GRSTG(e.g.- Stage1), the system should not allow to enter another record with the same Grievance Number and Stage for the same employee.i.e. No duplication should be allowed. i.e only 3 records for 1 Grievance Number as there are only 3 stages.
Please advice me how to proceed for the same.
Thanks & Regards,
Preetihi
Its not getting clear that u want the changes for ADhoc query or in pa30.
if u want validations in adhoc query as u have mentioned in the question
u need not to go to a user exit.
In adoc query itself u can incorporate these changes
u can go to infoset of this query and write a abap code which checks the Infotype 102 for the grievance no.
If u want the validation on while creating the record then u have to use user exit ZXPAUD01 or can use BADI's also .
Regards
Manish
Award reward paoints If Useful -
Hi Friends,
I am getting this error when I execute the query.
Error message :
Warning You do not have authorization to read object ZCOMPCODE 'Company Code'.
Only I get this error, my friends can execute the same report w/o any issues.
Can anyone suggest me the solution for this happening.
Regards,
BalajiHello BW USER,
ZCOMPCODE is the name of the authorization object that is validated in the query.
This authorization object can have any name and inside is validating InfoObject or InfoObjects.
In your case ZCOMPCODE probably have 0COMP_CODE inside and that characteristic you might have in your query.
If you're using the old obsolete authorization of BW 3.x go to transaction RSSM and insert ZCOMPCODE in your authorization object and choose display you will see the characteristics that exist in that authorization object.
If you're using the new analysis authorization of BI 7 go to transaction RSECADMIN and choose actualization and insert ZCOMPCODE and choose display you'll see the authorization object and its content inside.
If you're not sure what concept you use try both and see what you're using.
Please assign points,
Diogo. -
XPATH Database Query Syntax in an Assign
Trying to get an XPATH Database query to work by assigning the Input variable value in a simple BPEL Process to my query condition. I keep getting invalid XPATH errors. I cannot seem to figure out how get write it out.
Here is what I have:
<from expression="orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')"/>
Here is my error:
Error(30): [Error ORABPEL-10039]: invalid xpath expression [Description]: in line 30 of "C:\OraBPELPM_1\integration\jdev\jdev\mywork\BPELws\ReadDB\ReadDB.bpel", xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" specified in <from> is not valid, because XPath query syntax error. Syntax error while parsing xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')", at position "80" the exception is Expected: ). Please verify the xpath query "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" which is defined in BPEL process. . [Potential fix]: Please make sure the expression is valid.
Any help?
Thanks!!!Ok. I have figured out how to place the condition (variable value) inside a concatentated string. So my final result is the actual XPATH Query-Database statement. But the problem is it is being returned as a String. How can I turn that final string into the XPATH expression I need? I suspect another <COPY> block could pull this off but I am not sure how to do it.
Here is my code:
<process name="QueryBuild" targetNamespace="http://xmlns.oracle.com/QueryBuild" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:client="http://xmlns.oracle.com/QueryBuild" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<partnerLinks>
<partnerLink name="client" partnerLinkType="client:QueryBuild" myRole="QueryBuildProvider"/>
</partnerLinks>
<variables>
<variable name="inputVariable" messageType="client:QueryBuildRequestMessage"/>
<variable name="outputVariable" messageType="client:QueryBuildResponseMessage"/>
<variable name="QueryText" type="ns1:string"/>
</variables>
<sequence name="main">
<receive name="receiveInput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="inputVariable" createInstance="yes"/><!-- Generate reply to synchronous request -->
<assign name="Assign_1">
<copy>
<from expression="concat("orcl:query-database('select ename from emp where empno = ", bpws:getVariableData('inputVariable','payload','/client:QueryBuildProcessRequest/client:input'), ",false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL)'")"/>
<to variable="QueryText"/>
</copy>
<copy>
<from variable="QueryText"/>
<to variable="outputVariable" part="payload" query="/client:QueryBuildProcessResponse/client:result"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="outputVariable"/>
</sequence>
</process> -
Oracle 10g Query on Date Column
Hello -
What is the most efficient way to query on a date column to get all dates within the last 2 months? I use something like the following in the WHERE clause:
billing_date >= to_date(add_months(sysdate, -2))
However, I can't ever get the index on billing_date to be used.
Any help is greatly appreciated...
Thanks!!This is a perfectly valid way to query the data. Here's an example on my own production tables. This one has about 300 million rows:
select *
from prod.tran_history
where tran_date >= to_date(add_months(sysdate, -2))
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 11M| 863M| 146K|
| 1 | TABLE ACCESS BY INDEX ROWID| TRAN_HISTORY | 11M| 863M| 146K|
|* 2 | INDEX RANGE SCAN | TRAN_HIST_DATE_IDX | 2144K| | 2098 |
-------------------------------------------------------------------------------------------- -
I have following queries to be solved please help me out....
1) Difference / Limitation of Oracle Standard Edition / Enterprise Edition 10..... latest ?
2) Can Data of Oracle 8. ..... Expo File will be Imported to 10....... latest ?
If not than what steps we have to take. Basically I would like my current DB of 8 to be moved to 10G
3) From which AIX Ver Oracle 10 ...... is Supported ?
4) if the customer has 8... Ver Lic When if goes for New Ver than media will have full Ver or only Upgrade files. ?
5) If the Customer has Old ver Lic and he goes for upgrade Lic Than we have to first Install Old Lic Ver & than Upgrade or directly we can load Latest Lic Ver on New Server and work. ? What I mean is if I have to go ahead from Oracle 8 to Oracle 10G how should I go about.
6) Is Oracle Media ver Compatible for Aix ?
7) Oracle Lic Policy / Product Information Web Link ?
Thanks & Regards
Shivanand S SThis is a perfectly valid way to query the data. Here's an example on my own production tables. This one has about 300 million rows:
select *
from prod.tran_history
where tran_date >= to_date(add_months(sysdate, -2))
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 11M| 863M| 146K|
| 1 | TABLE ACCESS BY INDEX ROWID| TRAN_HISTORY | 11M| 863M| 146K|
|* 2 | INDEX RANGE SCAN | TRAN_HIST_DATE_IDX | 2144K| | 2098 |
--------------------------------------------------------------------------------------------
Maybe you are looking for
-
Hi, I am in charge to write a routine to export invoices data to Oracle AP R11.0.300. My question is: There's a something similar to Open Interface Tables of R11i aplicable to this version?
-
Failed to open the connection after changing the connection in CMC
Hi Below are our environment details: BOXI 3.1 SP3 Solaris Sparc 10 Crystal Reports 2008 Sp3 Weblogic 11g Our team is facing the problem as described below: We have created Crystal Reports using JDBC connection and it works fine in an environment(SIT
-
I have itunes installed on my computer, I have a new laptop with windows 8. It does not seem to recognise my ipod and therefore I cannot sync it. Any ideas on how to rectify this?
-
Need help with changing text size
Hi everyone, I would like to allow users to easily change the text size of a website I am designing. To see an examplme, go to the Dell website (www.dell.com), on the bottom left there is a link to enlarge the text (or bring it back to normal size).
-
What happens to emails sent to my organisation if my exchange 2013 server is off
Hello just new to exchange server. something i want to know is if my exchange server is not reachable or off, what happens to the emails people send to our organisation? do they just get lost or do they get bounced back to the sender? Many Thanks