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
Solved! Go to Solution.
Hi @Anonymous ,
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:
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:
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:
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,
Hi @Anonymous ,
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:
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:
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:
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,
@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
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 😉
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
198 | |
100 | |
59 | |
59 | |
55 |
User | Count |
---|---|
258 | |
161 | |
90 | |
79 | |
70 |