Display regional information - user selection

Copper Contributor

Hi, 

I have had a request from business continuity to create a dynamically displayed site so that when a user selects their building/office/location from a drop down list, the information below on the relevant webparts displays information relevant to their selection. 

 

For example, user selects Head Office (which is in UK) then web parts display Emergency Services number, local authorities, local electricians, plumbers etc. 

 

If the user selects a particular city location then the various web parts display information that is specific to their selection? 

 

Is this doable and how would I go about building it please? 

 

Thanks

Steve

1 Reply

Hi Steve (@Steve_Craison ), yes this can certainly be done with connected web parts. We use it on our intranet so when a user selects an office it brings up local restaurant and hotel info from Trip Advisor, a map of the office location from Bing maps and photos of the area from Bing photos.

 

A simple example is shown below and we've got a list with a couple of views: a view with just the name of the town and a view with all the other information. This is the All items view showing all the columns:
TownsList.png


You add a List web part on the page and select the view with just the town name.

 

Then in another column on the page add an Embed web part, click the 3 dots in the top right of the panel that opens and click the connect to source which will show just the list view you added earlier. Select that. You'll need to grab the view id of the details view of the list and wrap that in embed code and paste that into the embed code box. But you will need to adjust it to add a filter to the code so that it selects just the item that the user has selected.

 

TownsEmbed.png

 

So in my case the embed code is shown below and you add the column with the name of the town, in my case Title, to the FilterValue1=so it becomes FilterValue1=[$Title], in other words, the list is filtered by whatever town (in the title column) has been selected.

 

 

<iframe width="560" height="315" src="https://capita.sharepoint.com/sites/PowerApps-Solutions/Lists/TownsDetails/Details.aspx?FilterField1=LinkTitle&FilterValue1=[$Title]&FilterType1=Computed&sortField=LinkTitle&isAscending=false&viewid=7fbee63c-54d6-4192-bf1c-9df9b480fac6" frameborder="0" scrolling="no"> </iframe>

 

 


The result is shown in the attached video.

 

On this page we've also added another embed web part which, just for a bit of fun, gets photos from Bing of the selected town. In this case the embed code is shown below and you'll again see where the [$Title] is used:

 

<iframe width="500" height="400" src="https://www.bing.com/images/search?sp=-1&pq=[$Title]&sc=8-6&sk=&cvid=54853FD66CF6460B93A2704A6FFE001B&q=[$Title]&qft=+filterui%3alicense-L2_L3_L4_L5_L6_L7&FORM=IRFLTR" frameborder="0" scrolling="yes"> </iframe>

 

 

Come back with any questions about this.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User