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

Create a collection/gallery with pictures from the Media tab in PowerApps

Hey guys,

 

i want to create a gallery with images that i have uploaded in my App into "Media". Is there a possibility to achieve this?

I have tried the following:

1) I uploaded 4 pictures into Media (Image1.png, Image2.png, Image3.png, Image4.png)

2) I use the following code to generate a collection:

             Collect(
             MyCollection;
             {Value:"Image1"; Image: 'Image1.png'};
             {Value:"Image2"; Image: 'Image2.png'};
             {Value:"Image3"; Image: 'Image3.png'};
             {Value:"Image4"; Image: 'Image4.png'})

 

It is not working and gives me an error. I would be thankful if anyone got a solution to the problem.

BR,

Phil

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Phil_Thurner ,

Try this

Collect(
   MyCollection;
   {Name:"Image1.png"; contentBytes: Image1};
   {Name:"Image2.png"; contentBytes: Image2};
   {Name:"Image3.png"; contentBytes: Image3};
   {Name:"Image4.png"; contentBytes: Image4}
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
Nogueira1306
Super User
Super User

Hey! 

You should have something like:

Collect(
             MyCollection;
             {Value:"Image1"; Image: Image1.png});;

 

Collect(
             MyCollection;
             {Value:"Image2"; Image: Image2.png});;

 

Collect(
             MyCollection;
             {Value:"Image3"; Image: Image3.png})

 

 

But I dont understand why you want a collection with those.. But ok. Pluse, not sure if it will know what "Image1.png" is...

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

WarrenBelz
Super User
Super User

Hi @Phil_Thurner ,

Try this

Collect(
   MyCollection;
   {Name:"Image1.png"; contentBytes: Image1};
   {Name:"Image2.png"; contentBytes: Image2};
   {Name:"Image3.png"; contentBytes: Image3};
   {Name:"Image4.png"; contentBytes: Image4}
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,589)