cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marke525
Helper I
Helper I

Gallery images

I want to use the gallery layout with images.  My image files are in the Media section.  My search for the gallery is currently set:

 

Search(TechDeckData,TextSearchBox1.Text, "Product_Category", "Product_Type")

 

So the gallery can be searched.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Marke525 :

  Thanks for your explanation,I get it now.

  I'm afraid there is no way to directly call the entire media library (otherwise it will become a lot more convenient), but I think using the switch() function may make your formula more concise.For example:

Switch(
    ThisItem.Product_Type,
    "Watch",
    'Watch',
    "Wallet",
    'Wallet'
……
)

Best Regards,

Bof

 

 

View solution in original post

4 REPLIES 4
v-bofeng-msft
Community Support
Community Support

Hi @Marke525 :

Could you tell me :

  • What is TechDeckData?Is it a SharePoint List?
  • What is "Media section"?Is it a picture column that in TechDeckData?

I assume 'TechDeckData' is a SharePoint list and 'Media section' is a picture column in 'TechDeckData'.If so,you only need to add a image control into the gallery,and set the image control's items property to

ThisItem.'Media section'

1.JPG

If this is not what you want, could you provide more details? (A screenshot is better)

Best Regards,

Bof

 

Thanks for your reply.  Yes, TechDeckData is an excel spreadsheet.  The Media section I referred to is where images are stored in Power Apps:

Marke525_0-1601611997264.png

 

I've found a way to get the images listed by using a ridiculous number of If statements, I just have to believe there is a better, more elegant way to do this:

 

If(ThisItem.Product_Type = "Car", ‘Car',

 If(ThisItem.Product_Type = "Watch", ‘Watch’,

  If(ThisItem.Product_Type = "Wallet", ‘Wallet’,

   If(ThisItem.Product_Type = "Gloves", ‘Gloves’,..........

 

Hi @Marke525 :

  Thanks for your explanation,I get it now.

  I'm afraid there is no way to directly call the entire media library (otherwise it will become a lot more convenient), but I think using the switch() function may make your formula more concise.For example:

Switch(
    ThisItem.Product_Type,
    "Watch",
    'Watch',
    "Wallet",
    'Wallet'
……
)

Best Regards,

Bof

 

 

Thanks for the solution.  It is more elegant than what I had done.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (5,240)