User Context is generally used to Get the data of specific users which are logged in so that it displays the information required only for their data or the reportee's data if needed.
For Example generic basic use case of managers to view the reportee details.
In the above Query , Manager as USERCONTEXT uses the logged in user id When you see the results in analytics history.
Now as Role_admin user if you login and run the report , you will be able to see all the users.
As a manager when you login and check the history , you will be able to see only the reportee details.
Also this Analytics can be used to map to Dashboard and Manager can easily check the count and details. For creating a Dashboard you can configure it as below
Once the Dashboard is created, Assign this Dashboard to the specific sav role ( role_manager in this case ).
Logged in Users can now see how many reportees they have and also details when they click on the dashboard which will be redirected to Analytics report.
Note: This is applicable in all the versions ( EIC and Sp 3.x versions )
I have tested it out as descripted:
I have created a New Analytics Using SQL Query
The report is working fine.
So I have done Create New Dashboard:
But after clicking on create the Chart Properties are not filled:
Can you please advice me, what I did wrong?
We have V23.3.
For Tiles, you need to set the chart properties, for Charts it auto populates.
You can check how to set in the below doc
I tried the same but the dashboard is not giving me the results. Let me know if there is any changes i have to do ? We are v2022
It should work if you are putting the chart properties correctly, and all the config's correctly.
May be you can attach a screenshot of analytics page created ( take screenshot with the url as well ), dashboard config , what error / what is not displaying correctly
i am using ES Pie chart and values are zero
In case of Pie charts you need to give local query and global json query, Please go through the documentation fully
Same with ES tile as well. It is giving zero results.
Now i am getting the results in Tile. How do i get the results in Pie? Any suggestion on how do i pass the value in manager user key in global json?
Without much details i cant help you here, In the documentation its a direct step to configure the Pei chart, ( Also chat properties will be updated automatically ) but you may need to give the local and global json . ( you can refer the examples in doc as already said )
As discussed , after giving the column name in the Dashboard it worked as per your requirement
Hi @Darshanjain ,
I had a query regarding user context. So according to our requirement we need to create dashboards for 1. Onboarded today 2. Onboarded in past 30 days 3. Terminated today 4. Terminated in past 30 days. So Use case is like few IT teams from client side based on country need to see these report. For ex: I am from India IT team I should be able to see in these 4 dashboards only users that belong to India.Rest of them should be hidden from me. Do you have any idea how this can be achieved?
Can you post a new forum topic on this mentioning this link