cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PhineasT
Helper IV
Helper IV

View Images Rather than Attachments

Edit/Update:
I got it to this; a Gallery 'outside' the form that is displaying three images.

I currently have an 'Edit' form in which is being displayed data from a Collection/List, including attachments.

I need to filter the return to only show images associated with the data in the form shown on the screen, not all images.
In the example below Foghorn and McGruff should be the images showing.

The below is showing me the 'First' image associated with the three test items in the list.

Form DataSource = [@'Scheduler Details List']
Form Items = BrowseGallery1.Selected
Gallery Items = 'Scheduler Details List'
Image = First(ThisItem.Attachments).AbsoluteUri

PhineasT_0-1653847197853.png

End of Edit/Update****************************************



I've tried to add a Gallery to the Attachment data card and to the form, neither took; the controls always land outside the card/form.

I can get an image control to land in the Attachment card and display the first attachment as an image with - 


               First(ThisItem.Attachments).AbsoluteUri


I need to be able to see up to eight (8) images. Desired output is a scrollable horizontal gallery type configuration.

 

PhineasT_0-1653840384718.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

@PhineasT ,

I think this was solved over in this thread. Please remember to close any open threads you no longer need assistance on.

View solution in original post

12 REPLIES 12
Waegemma
Super User
Super User

Hi @PhineasT ,

 

Only two things to change:

 

Set Gallery Items to:                   BrowseGallery1.Selected.Attachments

Set Image control in Gallery to:  ThisItem.AbsoluteUri

 

 

galleryattachments.png 

Succes!

 

Marc

Nope, didn't work.

 

To clarify the Gallery where the images are displayed is a stand-alone Gallery pulling data from a Collection/List that has the data including the attachments.

The view with the data and attachments actually a 'View' Form.

The Gallery and Form have no connection other than the source data.

PhineasT_2-1653852359937.png

 

PhineasT_1-1653852321949.png

 

 

Waegemma
Super User
Super User

Hi @PhineasT ,

 

My working setup:

                Sharepoint List,

               

                BrowseGallery to select items from the SP List (this gives BrowseGallery1.Selected)

 

                Form to view the selected item from the BrowseGallery (item = BrowseGallery1.Selected)

 

                Gallery on the same screen as the Form connected to the attachments of the selected item

                                                                                         (items= BrowseGallery.Selected.Attachments)

 

                Image control in the Gallery (image=ThisItem.AbsoluteUri)

 

Is this the same as your setup?

 

 Marc

Waegemma
Super User
Super User

Hi @PhineasT ,

 

Forgot to ask: did you set the image Gallery Source to the list/collection you use? 

Sorry, mixed two things up!

 

Marc

Just the way you wrote it.

Image:
PhineasT_2-1653853739196.png

 

Gallery:

PhineasT_1-1653853681749.png


Form:

PhineasT_0-1653853640881.png

 

Yep; both Form and Gallery are looking at the same 'List' as datasource.

Waegemma
Super User
Super User

And does the BrowseGallery have an item selected?

 

Yes.

I even cleared and picked another user, so that you can see the images changed. Now they are 'Daffy' and 'Jim', rather than 'Foghorn' and 'McGuff'.

Besides, I don't believe content is the issue. The Power Apps doesn't like the combination of formulas.

PhineasT_0-1653854788451.png

 

Waegemma
Super User
Super User

Schermafbeelding 2022-05-29 220628.png

ab4e03fe-bd28-48ae-88b4-3bb5b377bfc5.png

 

I set this test up and it works just fine: select an item in the BrowseGallery and navigate to the Editscreen where the image Gallery and the Form display all the data.

 

If you don't mind: I'm gonna sleep over it. Take another look tomorrow 🙂

 

Marc

 

 

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 (4,165)