0

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:-

enter image description here

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

1 Answer 1

-1

Or you can also rename the file initially before the actual uploading happens in the SharePoint list.

2
  • but we are not talking about manual renaming.. Commented Mar 16 at 11:13
  • No sorry for the misunderstanding but I did not mean to update it manually. What I was saying is, rename the file in the process just after the button is clicked, I'm sure you can run a js on the canvas then manipulate it from there. Commented Mar 18 at 20:47

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.