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

 

 

View solution in original post

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,099)