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?
Feb 18, 2022 10:02 AM
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.).
Feb 18, 2022 10:34 AM - edited Feb 18, 2022 10:35 AM
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
Feb 18, 2022 01:08 PM - edited Feb 18, 2022 01:09 PM
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.).
Feb 18, 2022 10:34 AM - edited Feb 18, 2022 10:35 AM
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.
Feb 18, 2022 12:35 PM - edited Feb 18, 2022 01:08 PM
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
Feb 18, 2022 01:08 PM - edited Feb 18, 2022 01:09 PM
Thank you. yes. I just posted that I just found that. they just don't make it easy.
Feb 18, 2022 01:10 PM
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.
Feb 18, 2022 01:17 PM