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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,987)