Debuging custom report fields in ASSET_DATA_VIEW_Computer_Accessories view
Greetings all.
Trying to debug a custom report that pulls data from the ASSET_DATA_VIEW_Computer_Accessories view. In that view there is a field "OWNER_ID," and also a field called "User" that do not match in all cases
the Field Data in "User" matches with the settings > user > associated assets, but I'm trying to work out where "OWNER_ID" is defined, or should i just run an update query to set User > OWNER_ID, or are they supposed to be the same and i've just found another bug in the system?
regards
Answers (2)
You may have just found out that this is the difference between a Device Asset record, where User is applied via the inventory and a rule, and any other kind of Asset Type, whereby ownership is defined by adding in a User custom field into the Asset type.
So you may need to select the right one depending on the asset type, or select both for a combined report
Comments:
-
Worked out whats going on. Looks like its related to the Kace Go mobile app, which for many of these assets would have been used to bring in and assign the asset.
In the Kace Go app, for this asset type, there is 2 locations where we can assign an asset to a user. One with the label "Assigned User", and another being my "User" field in the asset type. This "Assigned user" value is possibly an old field that has been deleted, but i cant be sure. When i look in the asset type definition, and the asset in the browser, this "assigned user" is not there, nor has it been hidden.
It looks like the OWNER_ID is what is presenting as the "Assigned User" on the Kace Go app for this asset type. It looks to be there for all asset types.
Going to put in a ticket with support to see what they say. - Norlag 4 years ago-
The Asset table contains a column called owner_id which i the owner of that asset. owner_id can be joined to the user table to pull in the user name if desired. - KevinG 4 years ago
A View is an object created with Create View that when referenced produces a result set. A view acts as a virtual table.
https://mariadb.com/kb/en/views/
For a custom report, you should be using references to the actual DB tables and using the appropriate joins.
What is the asset, user data you are interested in the report output?
If you are not familiar with SQL, our Professional Services group can give you a quote you for assistance.
remoteconfig@quest.com