cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom attributes and where do they live?

I've inherited a flexnet manager studio instance that has custom attributes added to a custom tab for assets.

I've reviewed the stored procedure : AddTabToWebUIPropertiesPage and I can see where the UI is updated to create the fields for the UI page.  what I cant  find is the data when an asset gets updated.  I've reviewe Assets table,  not there,  I've reviewed the Itemresource table, not there.  any suggestions? 

(2) Solutions
bheadley
By Level 5 Flexeran
Level 5 Flexeran

Yes, that stored procedure can be used to add or update custom properties for display in the UI. The data for a custom property related to an Asset will be stored in the AssetPropertyValue table/view in the Compliance database. Custom properties will have their data stored in a table/view with the name of <TargetType>PropertyValue for each TargetType (Asset, ComplianceComputer, etc.).

View solution in original post

It's slightly more complex to get the data as there is also an AssetTypeProperty table involved (or <TargetType>TypeProperty). The match is between ItemResourceName in the UIITem table and PropertyName in AssetTypeProperty.

Here is a little bit of an example:

SELECT * FROM AssetPropertyValue apv
INNER JOIN AssetTypeProperty atp
on atp.AssetTypePropertyID = apv.AssetTypePropertyID
INNER JOIN UIITem u
on u.ItemResourceName = atp.PropertyName

Hope that helps!

Bill

View solution in original post

(5) Replies
bheadley
By Level 5 Flexeran
Level 5 Flexeran

Yes, that stored procedure can be used to add or update custom properties for display in the UI. The data for a custom property related to an Asset will be stored in the AssetPropertyValue table/view in the Compliance database. Custom properties will have their data stored in a table/view with the name of <TargetType>PropertyValue for each TargetType (Asset, ComplianceComputer, etc.).

I was going to follow up with a question but I eventually found it.  Where do I match Asset Property valueID to its name from the UIItem table.  because the name is not in the assetpropertyvalue table. and the ID's don't match.  

You have to take the name you are looking for and join it to the AssetTypeProperty table.  ugh.  why did they make it so complicated.  

 

 

 

It's slightly more complex to get the data as there is also an AssetTypeProperty table involved (or <TargetType>TypeProperty). The match is between ItemResourceName in the UIITem table and PropertyName in AssetTypeProperty.

Here is a little bit of an example:

SELECT * FROM AssetPropertyValue apv
INNER JOIN AssetTypeProperty atp
on atp.AssetTypePropertyID = apv.AssetTypePropertyID
INNER JOIN UIITem u
on u.ItemResourceName = atp.PropertyName

Hope that helps!

Bill

Thank you.  yes.  I just posted that I just found that.  they just don't make it easy.

 

bheadley
By Level 5 Flexeran
Level 5 Flexeran

No, it is not simple that is for sure. I think the reason behind this is that it is used for different Target Types so ComplianceComputer, SoftwareLicense, Contract, Purchases, etc. and there needed to be a standard way to get at the data for the UI to work properly. Data normalization of some form may have been a different way to handle it but who knows if that might have ended up being even more complex.

Glad to hear that you've got it figured out.