Add user info as URL parameter

7962
3
01-27-2022 02:03 AM
Labels (2)
KennethLindhardt1
Occasional Contributor

Hi I'm trying to figure out how to filter my dashboard, by the user that opens it. Right now I'm using a Survey123 form that triggers a Power Automate that are sending an email with an URL that are filtering on multiple things. However the ideal solution would be, not to have this massive amount of links and emails that you'll need to browse through, to find the right one.

In the feature, there will be a field with the email that matches the user email when you are logged on to Enterprise. So if I could create a dashboard, that updates the URL automatically with the logged in user as a parameter, then I would need only one URL, and the user will see only what is relevant to him/her.

 

That's my idea anyway, it could be that there's another method I haven't thought of.

Thanks 

3 Replies
SzuNyiapTang
Esri Contributor

Hi @KennethLindhardt1 

Do you know which version of dashboard are you using?

There is URL parameters feature that you can use. You can create a parameter(eg email) to filter the dashboard via email. Then from Power Automate, you can use https://fqdn/...?email=abc@mail.com

URL parameters—ArcGIS Dashboards | Documentation

Configure actions on URL parameters—ArcGIS Dashboards | Documentation

Cheers,

Tang

Cheers,
Tang
0 Kudos
KennethLindhardt1
Occasional Contributor

Thank you SzuNyiapTang Right now it's the classic dashboard, but could be anything really. What you are describing, is what I'm doing, but by hardcoding the email through Power Automate, I'll need 50 different links, one for each user. What I'm thinking of, is automatically add the ?email=abc@mail.com   and take the mail from the user that are logged in, just like when we look at a users info

KennethLindhardt1_0-1643353630549.png

 

 

0 Kudos
SzuNyiapTang
Esri Contributor

Hi @KennethLindhardt1 ,

I don't think there is anything out-of-the-box. If 1 generic link is desired from Power Automate, you might want to explore on customizing a simple HTML page and embed the dashboard in the HTML Page.

High level workflow:

1. Authenticate User through HTML Page using ArcGIS JS API. Authenticate with an ArcGIS identity | Overview | ArcGIS API for JavaScript 4.22 | ArcGIS Developer

2. Get User Email/username

3. Append to embedded dashboard url

 

Cheers,
Tang
0 Kudos