cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sam_Chapman
Level: Powered On

Change Image based on Drop down

Hello,

 

So i have a drop down menu and then an image below it.

 

I have all of my images saved in a connected onedrive folder in PNG format.

 

I want to be able to choose from the drop down list and then the image below it change based on that value.

 

E.G. If I select tree from the drop dow menu it finds the image named 'Tree' in the onedrive fodler fromt eh connection and displays it in the App.

 

This is currently only a development and will be linked trough SHarePoint in the future

 

Thanks in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions
John_
Level: Powered On

Re: Change Image based on Drop down

I would look at implimenting a switch. (in the onchange of the dropdown)

Switch(Dropdown.Selected.Value, 
"Kittens", Set(Image, "kittens.png"),
"Dogs", Set(Image, "dogs.png"),
"Ponies", Set(Image, "ponies.png")
)

Otherwise instead of setting the image you could make image a visable parameter so 

you'd have 3 images in the below example and set the images however you want them and just have the switch manage the visiable part...

 

Switch(Dropdown.Selected.Value, 
"Kittens", Set(kittensimagevisable, true),
"Dogs", Set(dogimagevisable, true),
"Ponies", Set(poniesimagevisable, true)
)

 

View solution in original post

Sam_Chapman
Level: Powered On

Re: Change Image based on Drop down

So I have managed to do it by useing the exact sharepoint/onedrive link to the file as the switch result

View solution in original post

4 REPLIES 4
John_
Level: Powered On

Re: Change Image based on Drop down

I would look at implimenting a switch. (in the onchange of the dropdown)

Switch(Dropdown.Selected.Value, 
"Kittens", Set(Image, "kittens.png"),
"Dogs", Set(Image, "dogs.png"),
"Ponies", Set(Image, "ponies.png")
)

Otherwise instead of setting the image you could make image a visable parameter so 

you'd have 3 images in the below example and set the images however you want them and just have the switch manage the visiable part...

 

Switch(Dropdown.Selected.Value, 
"Kittens", Set(kittensimagevisable, true),
"Dogs", Set(dogimagevisable, true),
"Ponies", Set(poniesimagevisable, true)
)

 

View solution in original post

Sam_Chapman
Level: Powered On

Re: Change Image based on Drop down

Thanks John I will give this a go!

Sam_Chapman
Level: Powered On

Re: Change Image based on Drop down

How do i refference the images?

 

Its not currently finding them?

Sam_Chapman
Level: Powered On

Re: Change Image based on Drop down

So I have managed to do it by useing the exact sharepoint/onedrive link to the file as the switch result

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,366)