Hello,
I have a gallery with attachment control. When having Gallery selected item I wish to remove one out of maybe 3 attachments. Looking for guidance how to do such thing.
Solved! Go to Solution.
Hi @LukasSliuzas ,
Not sure if you meant Attachment ID or something else.
Below code will help you get the attachments in the SharePoint list items.
Filter(DataSourceName,Condition).Attachments.id
or
Filter(DataSourceName,Condition).Attachments.DisplayName
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @LukasSliuzas ,
Do you randonly want to remove the item from the attachment control or you have any 'X' icon to remove the selected attachment from the attachment control ?
A screenshot will be helpful.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @PG_WorXz10
Yes I do "X" but I don't use EditForms to create this attachment controls. All of my fields and items are created/updated via Patch. No SubmitForm(Form1) thing
For attachment control use this action ,OnRemoveFile on this action use flow to remove the desired file from the sharpoint.
Hi @LukasSliuzas ,
In the Create screen do you have this control ?
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Yes I do and I use OnAddFile:
Then I just push that data via PowerFlow and issue solved. If I could somehow get those attachments into Collection again and maybe somehow to compare them I could run same flow but backwards
Hi @LukasSliuzas ,
As per your code it seems you are collecting all the attachments in colFinalData. Are you pushing all the attachments at once or one by one ?
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Yes I do push all of them at the same time in a flow.
In that case it is possible for you to create a gallery and add colFinalData as item and show the attachment name in text field and add a cross icon on click of which you can delete the files and after that on button trigger or some other trigger you can push the remaining attachments into the flow.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
User | Count |
---|---|
153 | |
93 | |
83 | |
77 | |
58 |
User | Count |
---|---|
198 | |
176 | |
104 | |
96 | |
89 |