Does anyone know what is "TargertObjectID" parameter used for? Does it point or refer another parameter on the DB tables or views?
Does anyone know what is "TargertObjectID" parameter used for? Does it point or refer another parameter on the DB tables or views?
The TargetObjectID is a variable that you place in your report query, which would later be populated when using the reports in any Object Dashboard. It would contain the ID of the object you are opening in the UI. For example if it is a User Object Dashboard, then TargetObjectID would contain the ID of whichever User you open in the UI.
Quoting from the documentation:
Working with Built-In Parameters
Built-in parameters are specified at query definition time and are automatically replaced at
run-time with values set by the dashboard system layer. Built-in parameters include:
• CurrentUserID — The value of this parameter is automatically replaced by the ID of the
currently logged in user. This parameter can be used in any dashboard.
• TargetObjectID — The target ID of the selected object. This parameter can only be used in
object dashboards and is replaced by the selected object on that dashboard.
Using CurrentUserID in a Query
CurrentUserID is used to display charts and reports that are specific to the current user. This
places an additional filter on the query and permits the customized display of report and chart data
for the logged-in user.
For example, a query for a “My Subordinates” report that includes the CurrentUserID parameter
would look like this:
select last_name, first_name
from acmdb.users
where supervisor_id = :CurrentUserID
At run-time the report would provide information about only those users who are subordinates of
the supervisor.
Using TargetObjectID in a Query
TargetObjectID filters the results of a query based on selected target object.
For example, a query for a chart showing success and failure counts for a given collector would
look like this:
select ??????, ??????
from ???????
where collector.id = :TargetObjectID
At run-time the chart would provide success and failure count information for the particular
collector when a user invokes the collector object dashboard.
The TargetObjectID is a variable that you place in your report query, which would later be populated when using the reports in any Object Dashboard. It would contain the ID of the object you are opening in the UI. For example if it is a User Object Dashboard, then TargetObjectID would contain the ID of whichever User you open in the UI.