Display regional information - user selection

%3CLINGO-SUB%20id%3D%22lingo-sub-2210716%22%20slang%3D%22en-US%22%3EDisplay%20regional%20information%20-%20user%20selection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2210716%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20had%20a%20request%20from%20business%20continuity%20to%20create%20a%20dynamically%20displayed%20site%20so%20that%20when%20a%20user%20selects%20their%20building%2Foffice%2Flocation%20from%20a%20drop%20down%20list%2C%20the%20information%20below%20on%20the%20relevant%20webparts%20displays%20information%20relevant%20to%20their%20selection.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20user%20selects%20Head%20Office%20(which%20is%20in%20UK)%20then%20web%20parts%20display%20Emergency%20Services%20number%2C%20local%20authorities%2C%20local%20electricians%2C%20plumbers%20etc.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20the%20user%20selects%20a%20particular%20city%20location%20then%20the%20various%20web%20parts%20display%20information%20that%20is%20specific%20to%20their%20selection%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20doable%20and%20how%20would%20I%20go%20about%20building%20it%20please%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ESteve%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2210716%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

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