cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Add picture to existing an existing SharePoint list-item

Hello my fellow PowerAppers!

 

I have made a service desk-app where the data is stored in Azure SQL and the pictures in a sharepoint list. The app creates a record for each case where the pictures are stored. I have two questions:

 

#1

What is the best way to display the images for the case in the app? The way I figured out how to do it is probably not the best way... It goes as follows:

 

Gallery1.Items:
First(Filter(SharePointList,ID=CaseID)))

The reslut is a gallery with all the records for the list that each can hold multiple pictures. This gallery is not visable as it only serves Gallery2.

 

Gallery2.Items:
Gallery1.Selected.'{Attachments}'

The image control in the gallery is set to ThisItem.AbsoluteUri. The reslut is a gallery which displays all the pictures from the record that matches the CaseID. It works fine for me but I bet there is a better way to do it.

 

 

#2

Lets say the user creates a case and upload three images. I review the case and find out I want more pictures. How do I collect more pictures to the same record from powerapps? Is this even possible?

 

 

I have tried to search the forums and youtube for a solution to my issues but I can't find one. I would appreciate any help I can get and please tell me if you need more information aboiut my app.

 

Cheers,

Joakim 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Add picture to existing an existing SharePoint list-item

Hi @JoakimAndersson ,

Could you please share a bit more about your scenario?

Further, could you please show more details about the data structure of your SP list?

 

For your first question, I agree with your thought almost. If you just want to display attachments images for a specific case in your SP list, I think it is not necessary to add two Gallery controls within your app, a single one Gallery could achieve your needs:

Set the Items property of the Gallery1 (Image layout) to following:

LookUp(SharePointList, ID = CaseID).Attachments

Set the Image property of the Image control within the Gallery to following:

ThisItem.AbsoluteUri

For your second question, do you want to add extra attachment images to an existing SP list item? Based on the needs that you mentioned, I think you could consider take a try to add a Edit form to achieve your needs (using Edit form control to edit an existing SP list item).

I have made a test on my side, please take a try with the following workaround:4.JPG

 

5.JPG

On your side, within your app, you could add a Gallery (Gallery1) to display the list of Case records in your SP list. Set the Items property of the Gallery to following:

'YourSPList'

Add a Edit icon button within above Gallery, set the OnSelect property to following:

EditForm(Form1);
Navigate(Screen2, ScreenTransition.Fade)

Within the Edit screen, add a Edit form (Form1), set the Data Source property to your SP list data source. Set the Item proeprty of the Edit form to following:

Gallery1.Selected

Set the OnSuccess property of the Edit form to following:

Back()

Set the OnSelect property of the "Submit" button to following:

SubmitForm('YourSPList')

Please check the following GIF screenshot for more details:Test.gif

 

 

In addition, for your first question, you could also consider take a try to add a nested Gallery control within your first Gallery (Gallery1) as below:6.JPG

Set the Items property of the nested Gallery (Gallery2) to following:

ThisItem.Attachments

Set the Image property of the Image control within the nested Gallery (Gallery2) to following:

ThisItem.AbsoluteUri

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Add picture to existing an existing SharePoint list-item

Hi @JoakimAndersson ,

Could you please share a bit more about your scenario?

Further, could you please show more details about the data structure of your SP list?

 

For your first question, I agree with your thought almost. If you just want to display attachments images for a specific case in your SP list, I think it is not necessary to add two Gallery controls within your app, a single one Gallery could achieve your needs:

Set the Items property of the Gallery1 (Image layout) to following:

LookUp(SharePointList, ID = CaseID).Attachments

Set the Image property of the Image control within the Gallery to following:

ThisItem.AbsoluteUri

For your second question, do you want to add extra attachment images to an existing SP list item? Based on the needs that you mentioned, I think you could consider take a try to add a Edit form to achieve your needs (using Edit form control to edit an existing SP list item).

I have made a test on my side, please take a try with the following workaround:4.JPG

 

5.JPG

On your side, within your app, you could add a Gallery (Gallery1) to display the list of Case records in your SP list. Set the Items property of the Gallery to following:

'YourSPList'

Add a Edit icon button within above Gallery, set the OnSelect property to following:

EditForm(Form1);
Navigate(Screen2, ScreenTransition.Fade)

Within the Edit screen, add a Edit form (Form1), set the Data Source property to your SP list data source. Set the Item proeprty of the Edit form to following:

Gallery1.Selected

Set the OnSuccess property of the Edit form to following:

Back()

Set the OnSelect property of the "Submit" button to following:

SubmitForm('YourSPList')

Please check the following GIF screenshot for more details:Test.gif

 

 

In addition, for your first question, you could also consider take a try to add a nested Gallery control within your first Gallery (Gallery1) as below:6.JPG

Set the Items property of the nested Gallery (Gallery2) to following:

ThisItem.Attachments

Set the Image property of the Image control within the nested Gallery (Gallery2) to following:

ThisItem.AbsoluteUri

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Add picture to existing an existing SharePoint list-item

@v-xida-msft Thank you for taking the time to help me out. Your answer solved all of my issues.

 

Have a great day!

 

Cheers,

Joakim

Highlighted
Super User
Super User

Re: Add picture to existing an existing SharePoint list-item

Hello everyone. In case you still have questions on the topic, we go through this in some more detail in this video.

Display SharePoint List Attachments in PowerApps (2019)

 

The .AbsoluteUri requires the user to be logged into the SharePoint front-end (which is not always the case obviously), while .Value uses the SharePoint connector to fetch the attachment(s) so this is a better option.

 

Dawid van Heerden

Follow on Twitter: @davestechtips

Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1

**If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions. AND we get points for it 😉

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,866)