I created a Risk attribute with a data type as formula. So this attribute becomes a virtual attribute.
Can you tell me where is this attribute created in database, in which table it gets created?
Ignore if already known.
If you are creating a virtual attribute in Project object, you may use database view ODF_PROJECT_V2 to get the values. Similar views exist for all or most of the objects as well. But, as it is hidden or undocumented feature, I suggest you consider the risks associated using this view.
Having said this, how about doing an SQL trace(for transaction such as opening any project page where you have virtual attributes) just to see if we can find how Clarity fetches the virtual attributes.
Virtual attributes do not get created on the database as such ; obviously their definition will be stored in the database as part of the meta-model of the object, but the attribute contents will only be calculated at the presentation level (i.e. in the GUI when the object is displayed).
So if you need to show the value in some SQL, you would just use the same "formula" as the virtual attribute.
Virtual attributes are virtual and are not stored in database. Its a run time calculation.
Re: ODF_PROJECT_V2 - good info (I didn't realise that) - the value still isn't stored though, its just "calculated" which amounts to the same thing as I was saying about having to code it into any SQL - the advantage of that view though would be that the application would "maintain" your code for you so its a much better answer.
Yes Dave, agree that values are not stored but just calculated at run time when using this view... I assumed that my response conveyed that point.. But thanks for raising the point.
That was really helpful. I found the virtual attributes and the data in the odf_project_v2 table.
Is it possible to identify the last user who has modified a virtual attribute?
I got the answer elsewhere, thanks anyway. Hope someone will find this helpful:
select oca.last_updated_by from odf_custom_attributes ocajoin srm_resources reson res.id = oca.last_updated_bywhere oca.extended_type='calculated' and internal_name = 'ATTRIBUTE_ID';
Retrieving data ...