I have a form inside canvas application , where i added 2 attachment sections; one named "Picture" and the other named "CV". now i want to associate the attachments that will be uploaded to each section, by renaming the Picture attachments to Picture-[ItemID] , and renaming the CV attachments to CV-[ItemID].
Here is the form's sections, with 2 attachments sections added inside custom card:-
and I defined the Items for the Picture attachment to be :-
Filter(ThisItem.Attachments,StartsWith(DisplayName,"Pic")) and I defined the Items for the CV attachment to be :-
Filter(ThisItem.Attachments,StartsWith(DisplayName,"CV")) then on the Submit button i am capturing the attachment inside collections as follow:-
SubmitForm(Form1); ClearCollect(varPicAttachemnt, DataCardValue6.Attachments); ClearCollect(varCVAttachments, DataCardValue6_1.Attachments); and on the form onsuccess , i can loop through the attachments as follow:-
ForAll(varPicAttachemnt, Patch(Forms,LookUp(Forms,ID=Form1.LastSubmit.ID), { Attachments: } )); But i am not sure how i can rename the attachments accordingly inside the form on success? Thanks
