cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JoakimAndersson
Level: Powered On

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
Community Support Team
Community Support Team

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.
2 REPLIES 2
Community Support Team
Community Support Team

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.
JoakimAndersson
Level: Powered On

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

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 54 members 4,423 guests
Please welcome our newest community members: