Hi All,
I have an app that submits data to a SharePoint list with numerous columns. Due to the number of columns, I've created multiple screens that the user must complete before submitting the request.
Upon clicking the "New Request" button on the app's home screen, I'm setting a global variable as follows:
Set(glblRequestData, Defaults(My_SharePoint_List));
There are 3 screens in total:
The "Item" property on formPart1, formAttachments, and formPart2 is set to the global variable, "glblRequestData".
formPart3 is essentially the "master" form which contains all of the fields to be submitted to the SharePoint list. The "Item" property on formPart3 is set as follows:
Patch(glblRequestData, formPart1.Updates, formPart2.Updates, formAttachments.Updates)
On Screen 3, there's another Attachments control included as one of the fields in formPart3. The Attachment controls on Screen 1 (formAttachments) and Screen 3 (formPart3) are associated to the same "Attachments" column on the data source (SharePoint List).
However, if I attach a file on Screen 1 (formAttachments) it's not carrying over to the attachments control on Screen 3 (formPart3).
In other words, I add a file using the attachment control on Screen 1 (formAttachments), but then once I've proceeded onward to Screen 3, the Attachments control on that final screen shows "There is nothing attached" (as illustrated in the screenshot).
So, essentially I'm trying to figure out how to "link" these controls together in such a way that if the user attaches a file on Screen 1, that same file will be displayed in the Attachments control on Screen 3 prior to them submitting the request.
Any thoughts on what I may be doing wrong?
Thank you!
Hi @Toastnbutter - this is indeed working for me now, though it's been quite some time since I had initially run into this issue, so I don't entirely recall what I did to get it working other than
a) deleting the form control that contains the Attachment Data Card/control altogether and then re-adding it.
b) updating the OnStart property of the Power App itself to create an attachments collection:
My current design of the app/split form configuration is essentially the same as when I originally described it:
From here, the user would click on a button to proceed to the next screen. This contains the second (and final) portion of the split form (formRequestPart2).
Now, within the OnSuccess property of formRequestPart2 is the functionality which sends an email notification. This includes a reference to the attachments. If a user adds 1 or more attachments to the "attchAttachments" control on the 1st screen:
OnSuccess:
Office365Outlook.SendEmailV2(
"My_Email_Address@something.com”,
"<My Email Subject>”,
"<My Email Body>”,
{
Attachments: AddColumns(
RenameColumns(
colAttachments,
"Value",
"ContentBytes"
),
"@odata.type",
""
),
Importance: "High"
}
);
I am curious if you ever got this issue resolved? If so, how?
Hi @bcanfield83 ,
Why do you have the Item as a Patch? Why not simply run the Patch and then base Form3 on the resulting record. I think your problem lies here.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399