web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change an image based ...
Power Apps
Answered

Change an image based on a dropdown on a different screen

(0) ShareShare
ReportReport
Posted on by

Hello,

 

On my app I have three different screens. I have a 'browse' screen that shows all of the assets I have on my Microsoft List. This is set to the layout 'Image, title, subtitle, and body'. On the other screen is an 'Edit' screen that allows you to change the properties of an asset. I want the image on the BrowseScreen1 to change depending on the dropdown of the AssetType on EditScreen1.

 

Below is an example. I have two images stored in the media area. One is a laptop vector image and the other is a desktop vector image. I need the asset type on the left to change the image on the right to a laptop.

 

Dropdown on EditScreen1Dropdown on EditScreen1Layout on BrowseScreen1Layout on BrowseScreen1

 

Thanks,

Sam

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @HeronS98 ,

    Set the image property of the Image control to something similar to :

    If(ComboBox1.Selected.Value="Laptop",'Laptop picture','Desktop picture')

    Hope it helps !

     

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    In your image control do something like this.  Use the image name WITHOUT the .image type and make sure to wrap the name in single quotes:

     

     

    Switch(
     AssetType.Selected.Value,
    
     "Laptop",
     'Name of Laptop Image',
    
    
     "Desktop",
     'Name of Desktop Image'
    )
    
    

     

     

     

  • SH-23070720-0 Profile Picture
    on at

    Hi @JR-BejeweledOne 

    The dropdown is stored in DataCardValue13 but when I put the code you have presented into the Image, it throws an error.

    Switch(
     'DataCardValue13'.Selected.Value,
    
     "Laptop",
     'laptop_vector',
    
    
     "Desktop",
     'desktop_vector'
    )
    
    
    

     

  • SH-23070720-0 Profile Picture
    on at

    Hello @gabibalaban,

    This hasn't worked I don't think.

    On the Image I have:

    If(DataCardValue13.Selected.Value="Laptop",'laptop_vector.jpg','desktop_vector.png')

     It's just throwing an error on the image.  I am planning to add additional sections like an iPad and Printer too.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Where is your error?   If it's in the formula can you provide a screen shot of the formula in the formula bar, where it shows the error?

  • SH-23070720-0 Profile Picture
    on at

    HeronS98_0-1636110691057.png

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I am sorry if I was unclear.    The formula provided goes in the 'Image' property of the image control in your gallery

  • SH-23070720-0 Profile Picture
    on at

    I don't have an image gallery (unless I'm just blind to it)

    There is a gallery that the PowerApp made for me when I integrated the List into PowerApps but it doesn't have the image property or control.

    HeronS98_0-1636111636008.png

    HeronS98_1-1636111748712.png

     

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I apologize, I have been going about this wrong I think.

     

    Change the formula that is in the Image property of the image control in the gallery like this:   ThisItem.AssetType should be whatever the column name is that contains the AssetType for the item.

     

    Switch(
     ThisItem.AssetType,
    
     "Laptop",
     'laptop_vector',
    
    
     "Desktop",
     'desktop_vector'
    )
    
    
    

     

  • SH-23070720-0 Profile Picture
    on at

    Unfortunately, it's still not worked.

    I might just leave it because it's not a major necessity, I just wanted to make the app look nicer.

     

    Thanks for your help though!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard