ADF dynamic ViewObject based on query. how to get attributes?
hi.
i have an read-only view object based on query like this:
SELECT :func(:paramm) as EMP_SAL from dual
and set :func & :paramm parameter by vo.setNamedWhereClauseParam(..) function.
but i couldn`t get EMP_SAL attribute after executeQuery command.
in another case i would set new whole Query by vo.setQuery(..) but the problem exists.
please help me. how to get attribute in such vo objects!
thanks!
Morena!
thanks to Quick reply!
i seek into code and found a uninitialized Parameter in view object. error has gone after correct the problem!
and now could get the attribute value.
thanks so much!
/\/\ o r e n a!
Similar Messages
-
Hierarchical query - How to get all parent records - Duplicate post
Hi,
In Oracle, START WITH, CONNECT BY commands will give all the direct and indirect child records. Other way round, is they are command which gives all the parent records till the root? Please let me know. I am working on Oracle 9i Release 2.
Thanks a lot for your help.
Edited by: skv on Nov 21, 2008 11:05 AMDuplicate post.
Hierarchical query - How to get all parent records
Please edit this post heading to duplicate post.
Regards.
Satyaki De. -
How To Get Attribute Names for a Particular VO
Hi ,
How To Get Attribute Names Of a Vo where I can Set Viewattributname To the Table RN Columns Where I am Adding Extra Columns Based on Some Condn..
So wen i am creating new Column to existing Table RN and we Need to add Attribute Name Also...Rt..
And How To get RelationShip Between Database Column Name and Java Vo Attribute Name
Ex: PlanId is the Java VO Attribute Name for the Database Column PLAN_ID
In The Same way Hw We Get the Relation ship for All other columns In the Controller Cllass ..
Can Any One Reply as It is urgent Req...
Thanks ,,
JithenInstead of using the VO attribute names to set and get values, best to go to the VO definition, click on Java, and generate the View Row Class with the accessors.
In the class where you're trying to set attributes, instead of a Row class, use the View Row class of your VO (eg ViewObjectName's class would be ViewObjectNameRowImpl), and when retrieving a row from the VO, cast the row to the previously mentioned View Row Class.
At that point you can use the View Row Class's methods that would perform sets and gets of each column.
To get attribute names, I don't know off the top of my head, but there might be a method mentioned in the Javadoc for the ViewRowImpl or ViewObject or ViewObjectDefinition classes to get the attribute/column mapping, or perhaps you can somehow read the XML definition of the VO which has that mapping.
Assuming business components were built automatically and no attribute names were overridden, intuitively the attribute name is a camelcase version of the column name, removing understores and capitalizing the character following the removed underscore - but that's not a fool proof approach. Just a general observation.
Hope this helps.
Edited by: user6631964 on Sep 16, 2010 12:31 PM -
How to get attribute value from standard page ?
Hi,
How to get attribute value from standard page ?
String str = (String)vo.getCurrentRow().getAttrbute("RunId");
But this value is returning a null value ....
Can anyone help me to get this attribute value which is actually having a actual value .getCurrentRow() would always return null if no setCurrentRow() is used.
Please check the page design and understand how many rows of VO are there. You can also use the following to get the row:
vo.reset();
vo.next();
Regards
Sumit -
Af:query - How to get the result rowsets
Hi,
I have a requirement where i need to search the db rows on and append the results the adf rich table on each search.
For this i am using af:query component. And trying to get the result rows for the named criteria.
String mexpr = "#{bindings.DestinDescVOCriteriaQuery.processQuery}";
processMethodExpression(mexpr, queryEvent, QueryEvent.class);
ViewCriteriaManager vcm = getDestinDescViewObj().getViewCriteriaManager();
ViewCriteria vc = vcm.getViewCriteria("DestinDescVOCriteria");
getDestinDescViewObj().applyViewCriteria(vc);
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(tblDestinDesc);
However on each click of search the rows searched in the previous attempt are not retained.
Can anyone let me know how to get the result from named criteria and append it the table?
Thanks
AjayCan anyone help?
-
SQL query - how to get parameters into a function within a SELECT statement
Hi,
I have SQL query roughly as follows
SELECT A, B, C, MAX(CASE...) AS "D_NAME", FunctionX(B, C, "D_NAME")
FROM...
WHERE...
How to get alias "D_NAME" as a valid parameter into FunctionX?Hi,
user8819407 wrote:
Hi,
I have SQL query roughly as follows
SELECT A, B, C, MAX(CASE...) AS "D_NAME", FunctionX(B, C, "D_NAME")
FROM...
WHERE...
How to get alias "D_NAME" as a valid parameter into FunctionX?Either
(1) repeat the calculation or
(2) compute it in a sub-query
Here's an example of (2)
WITH got_d_name AS
SELECT A, B, C, MAX(CASE...) AS "D_NAME"
FROM...
WHERE...
SELECT A, B, C, D_NAME, FunctionX (B, C, D_NAME)
FROM got_d_name
;A column alias (like d_name) can be referenced in the ORDER BY clause of the query where it was defined, but that's the only place in that query where it can be referenced. -
Af:query : How to get sql
Hi,
How can i get SQL Query that is executing when I enter some criteria and click on Search button of query panel?
I tried to override executeQuery() method of VOImpl and printed getQuery(). It is showing the query with bind variable in the query and vc_temp for the fields that are added in Advance mode.
I want to get the actual query that is getting executed.
Regards,
VinoCan anyone help?
-
When we run query how it gets the characteristic values and attributes.
Hi,
When we load transaction data it chacks characteristic values then SIDs then DIM IDs then insert DIM IDs into fact table but when we run the query how it checks and gets the characteristic values and attributes.
Bye
GKwhen we run the query how it checks and gets the characteristic values and attributes.
Just the opposite way you have described. It gets from the corresponding masterdata tables, with the connected SID. -
How to get attribute value from an object inside an object in Xpress
Does anyone know how to get an attribute value from an object in Xpress in a workflow? I have an object structured as follows:
<ResourceInfo accountId='mj628' tempId='3483372b787ce7dd:-5d99a0c5:130cb238483:-3600'>
<ObjectRef type='Resource' name='Google Apps'/>
</ResourceInfo>
I need if possible to get the name='Google Apps', which is inside the ObjectRef, so I guess its an attribute value of an object inside an object.If the ResourceInfo object is accessible in a variable, i.e. named "myResInfo", you just have to check the Java API and call the relevant method:
<invoke name='getResourceName'>
<ref>myResInfo</ref>
</invoke> -
Sap Records Management: how to get attributes of record?
Hi everybody who has had an experience in SAP Records Management programming.
Tell me please how can i get a list of attributes of certain record or document? I have an instance of CL_SRM_POID class and I also can get an instance of CL_SRM_SP_RECORD clas. But i haven't found out exactly what method gets attributes.
Thanks a lot.Finally i have sorted it out. Following procedure gets properties of record or document.
form get_record_attributes using uif_poid type ref to IF_SRM_POID
changing ct_properties type SRM_LIST_ATTRIBUTE_VALUE.
data: lif_srm type ref to if_srm,
lif_srm_service type ref to IF_SRM_SRM_SERVICE,
lif_prop_service TYPE REF TO IF_SRM_SRM_SERVICE_PROP,
lif_repository type ref to IF_SRM_SRM_PROP_REPOSITORY,
lif_attribute type ref to IF_SRM_ATTRIBUTE_VALUE,
lif_context type ref to IF_SRM_PROP_CONTEXT.
refresh ct_properties.
try.
lif_srm ?= uif_poid.
lif_srm_service = LIF_SRM->GET_SRM_SERVICE( ).
lif_prop_service = lif_srm_service->get_property_service( ).
lif_context = LIF_PROP_SERVICE->GET_CONTEXT( ).
lif_repository = lif_prop_service->GET_REPOSITORY( uif_poid ).
ct_properties = LIF_REPOSITORY->GET( lif_context ).
CATCH CX_SRM_INITIALIZATION .
CATCH CX_SRM_POID .
CATCH CX_SRM_REGISTRATION_DATA .
CATCH CX_SRM_SRM_PROP_REPOSITORY .
endtry.
Edited by: Petr.Plenkov on Mar 4, 2010 1:43 PM -
Query:how to get older date and value
Hi,
I am trying to develop a query that gives me the current amount assigned to a user/employee and the previous amount/old amount assigned to the employee.
The query so far looks like this:
select distinct p.ELEMENT_ENTRY_ID
+,p.EFFECTIVE_START_DATE+
+,p.EFFECTIVE_END_DATE+
+,p.LAST_UPDATE_DATE "UPDATE DATE"+
+,to_char(p.LAST_UPDATE_DATE,'MON') MONTH+
+,to_char(p.LAST_UPDATE_DATE,'YYYY') YEAR+
+,p.LAST_UPDATED_BY+
+,u.USER_NAME "ENTERED BY USERNAME"+
+,e1.FULL_NAME "ENTERED BY "+
+,v.EFFECTIVE_START_DATE+
+,v.EFFECTIVE_END_DATE+
+,v.SCREEN_ENTRY_VALUE "NEW AMOUNT"+
+,t.ELEMENT_TYPE_ID+
+,t.INPUT_CURRENCY_CODE "AMOUNT CURRENCY",t.ELEMENT_NAME+
+,t.DESCRIPTION+
+,e.FULL_NAME "ASSIGNED TO"+
from
pay_element_entries_f p
+,PAY_ELEMENT_ENTRY_VALUES_F v+
+,pay_element_types_f t+
+,PER_ALL_ASSIGNMENTS_F a+
+,per_all_people_f e+
+,fnd_user u+
+,per_all_people_f e1+
where
p.ELEMENT_ENTRY_ID=v.ELEMENT_ENTRY_ID
and p.EFFECTIVE_END_DATE=v.EFFECTIVE_END_DATE
and t.ELEMENT_TYPE_ID=p.ELEMENT_TYPE_ID
and t.BUSINESS_GROUP_ID=229
and a.ASSIGNMENT_ID=p.ASSIGNMENT_ID
and e.PERSON_ID=a.PERSON_ID
and p.LAST_UPDATED_BY=u.USER_ID
and v.SCREEN_ENTRY_VALUE <>'NULL'
and u.PERSON_PARTY_ID=e1.PARTY_ID()+
and p.CREATOR_TYPE <> 'F'
and e.EFFECTIVE_END_DATE> sysdate
and p.CREATOR_TYPE='SP'
and p.EFFECTIVE_END_DATE>sysdate
I need the older value of v.SCREEN_ENTRY_VALUE and the ,*v.EFFECTIVE_START_DATE*
*,v.EFFECTIVE_END_DATE* columns may vary from one employee to another and there could be more than two older values for each employee.
Any suggesions please.....AHS wrote:
Any suggesions please.....Yes.
1) post your Oracle version
select * from v$version;2) post some create table DDL and sample data (in the form of insert statements) so we have an idea of what you're starting with (this would be after you come up with a small, but complete example of your problem)
3) show us sample output representing the correct results based on the data in step # the second.
4) format your code with the tags -
AF:Query -how to hide attribute in basic mode but show/add in advanced mode
Hello,
I have a requirement to initially hide some attributes when displayed in BASIC mode of af:query with the possibility to add these hidden attributes in ADVANCED mode.
Is it doable somehow?
edit: JDeveloper 11.1.2.3.0, ADF BC
Regards,
Miroslaw
Edited by: Miroslaw on 2013-01-16 14:59Hi,
Always mention your JDev version.
If you are using BC4J as your model, you can create view criteria and set which attribute to be visible in which mode under UI hints, and use this criteria as query panel in your page.
-Arun -
I uses U2U canl builder to get queries,
How to write caml query for condition like,
(UserName==ABC && date1>=GivenDate1 && (date2<=givendate2 || date2 == null) )
one more
(UserName==ABC && date1>=givenDate1 && (date2<=givenDate2 || date3 <= givenDate2) )
SharePoint caml query if((condition && condition && (condition OR Condition))
ThanksHi,
According to your post, my understanding is that you wanted to Caml query with nested AND and OR for multiple fields.
The expression A AND B AND C looks like this:
<And>
A
<And>
B
C
</And>
</And>
Then the CAML query would look like as below.
<Where>
<And>
<And>
<Eq>
<FieldRef Name='AssignedTo'/>
<Value Type='User'>admin</Value>
</Eq>
<Geq>
<FieldRef Name='StartDate' />
<Value Type='DateTime'>2014-07-30T12:00:00Z</Value>
</Geq>
</And>
<Or>
<Leq>
<FieldRef Name='DueDate' />
<Value Type='DateTime'>2014-08-01T12:00:00Z</Value>
</Leq>
<IsNull>
<FieldRef Name='DueDate' />
</IsNull>
</Or>
</And>
</Where>
More reference:
http://msdn.microsoft.com/en-us/library/ms196939.aspx
http://sharepoint-experience.blogspot.com/2014/02/caml-query-with-nested-ands-and-ors-for.html
http://aasai-sharepoint.blogspot.com/2013/02/caml-query-with-multiple-conditions.html
Thanks & Regards,
Jason Guo
Jason Guo
TechNet Community Support -
SSRS report with cube – MDX query how to get an extra row with value '0'.
Hello everyone,
I'm unable to write the MDX query to get '0' value as first row in output. Following is my MDX query:
WITH MEMBER [Measures].[Dummy] AS '0'
SELECT NON EMPTY Union( {[Measures].[Amount] },{[Measures].[Dummy]}) ON COLUMNS,
NON EMPTY { ([Customer].[Customer Nbr].[Customer Nbr].ALLMEMBERS * [Fiscal].[Year].[Year].ALLMEMBERS ) }
having [Measures].[Amount] > 5000
ON ROWS FROM [cube]
With above query, the output returns the value '0' as a separate column.
I would like to get it in form of first row for [Measures].[Amount]. Like,
Amount
0
500
200
100
What needs to be changed to achieve the above result? I'm planning to use the above value in line chart to start the line from 0th value as described in following URL. (Note: The below URL is using SQL query and not MDX expressions.)
http://spinerain.blogspot.in/2013/09/ssrs-line-chart-create-stacked-line-and.html
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlThe round brackets in your expression are forcing an implicit crossjoin between the 3 lines. I would do the following which creates a set of the DummyYear plus the real year members and then crossjoin that with the customer set.
WITH MEMBER [Fiscal].[Year].DummyYear AS '0'
SELECT NON EMPTY {[Measures].[Amount]} ON COLUMNS,
NON EMPTY {[Fiscal].[Year].DummyYear,
[Fiscal].[Year].[Year].MEMBERS} *
[Customer].[Customer Nbr].[Customer Nbr].MEMBERS
having [Measures].[Amount] > 5000
ON ROWS FROM [cube]
http://darren.gosbell.com - please mark correct answers -
Hello everyone,
I am using the following MDX query on one of my SSRS report.
SELECT NON EMPTY { [Measures].[Days Outstanding], [Measures].[Amt] } ON COLUMNS,
NON EMPTY { ([Customer].[Customer].[Customer Key].ALLMEMBERS) }
HAVING [Measures].[ Days Outstanding] > 60
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM ( SELECT ( STRTOSET(@Location, CONSTRAINED)) ON COLUMNS
FROM ( SELECT ( {[Date].[Fiscal Period].&[2014-06]}) ON COLUMNS
FROM [Model]))
Over here, the data is being filtered always for current month and for a location that is being selected by user from a report selection parameter.
I would like to get the count of total no. of customers and sum of the amount measure.
When I am using them in calculated members it gives incorrect values. It considers all records (ignores the sub-select statements) instead of only the records of current month and selected location.
I also tried with EXISTING keyword in calculated members but there is not difference in output. Finally, I manage the same at SSRS level.
Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
Any help would be much appreciated.
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlCan anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
Hi Ankit,
We can use SUM function and COUNT function to sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension. Here is a sample query for you reference.
WITH MEMBER [measures].[SumValue] AS
SUM([Customer].[Customer].ALLMEMBERS,[Measures].[Internet Sales Amount])
MEMBER [measures].[CountValue] AS
COUNT([Customer].[Customer].ALLMEMBERS)
MEMBER [Measures].[DimensionName] AS [Customer].NAME
SELECT {[Measures].[DimensionName],[measures].[SumValue],[measures].[CountValue]} ON 0
FROM [Adventure Works]
Besides, you ask that does it make any difference if I manage it as SSRS level and not at MDX query level. I don't thinks it will make much difference. The total time to generate a reporting server report (RDL) can be divided into 3 elements:Time to retrieve
the data (TimeDataRetrieval);Time to process the report (TimeProcessing);Time to render the report (TimeRendering). If you manage it on MDX query level, then the TimeDataRetrieval might a little longer. If you manage it on report level, then the TimeProcessing
or TimeRendering time might a little longer. You can test it on you report with following query:
SELECT Itempath, TimeStart,TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
TimeDataRetrieval, TimeProcessing, TimeRendering, ByteCount, [RowCount],Source
FROM ExecutionLog3
WHERE itempath like '%reportname'
Regards,
Charlie Liao
TechNet Community Support
Maybe you are looking for
-
Prevent a character from showing up in textfield
Hi, I have a textfield..and the max # of characters allowed should be 15....so how can I stop the user from being able to enter any more characters after 15? I tried the keyPressedEvent(KeyEvent e) { if (fifteencharacters == true) e.consume(); but it
-
Webcam is not working even after I reinstall the system software
My webcam is not working even after I reinstall the system software. My questions are follows: Should I bring it to repair or get a external webcam? At approximately how much would be cost for repair? Which webcam I should get? Thank you very much! T
-
MIGO Goods issue ref. to order error in SAP
Hi, I have created a service order with IW34 or IW51, in that servie order i have use 5 items. When i am issuing material using MB1A Ref. to order all the items in that order are coming properly and i am able to post them but same when i try to issue
-
Smartform - Handling Static & Dynamic Windows - Very Important
Hi, This is in regards to a 5 page smartform that I have been assigned to develop. One concern of mine in associated with the Static (non-moving, non growing) and dynamic (moving & growing) fields in windows. 1. In a smartform, how do you handle
-
Where is Paint Bucket in ID CS6?
Indesign CS6, Windows XP. New to CS6 after upgrading from CS3. No paint bucket under gradint tool in CS6. or any other tool I could see.? I read Q & A about Paint Bucket alternative in AI. Is there an alternative tool to Paint Bucket in new ID?