cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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

Highlighted

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
Highlighted
Frequent Visitor

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

Highlighted

Thanks John I will give this a go!

Highlighted

How do i refference the images?

 

Its not currently finding them?

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,333)