
Hello,
I'm working on a project to create an order entry form that utilizes a gallery to allow for the creation of multiple lines for an order sheet. There's various bits of info that can be tailored for each line on the order sheet, but most importantly there's an attachment card for each new line item so that I can upload separate files for each line. I couldn't get a standard edit form to look and behave like this so here we are.
Almost everything is working, but I can't figure out how to "patch" multiple attachments from each row in the gallery to a sharepoint list along side the info that is entered with each row. I've been able to get the link to the Azure Blob manager bit to pass over to the sharepoint list, but I can't do anything with it there. The other way I can get something to work is to pass the "attachments Card" as a file through the automate flow with "create file" to a sharepoint library. This works, but only for the first row in the gallery. I'm not sure how to call a "thisitem" type function to iterate through all the items in the gallery or collection to pass them all along to the sharepoint list and be connected to the correct row.
Example of order entry form:
snippet of code to patch data to sharepoint list:
CreateFolder.Run(ProjectName);
Set(
RecID,
ForAll(
FinalInvoiceLines,
Patch(
'sharepoint list',
Defaults('sharepoint list'),
{
Title:'Project Name',
'Part Name':'Part Name',
QTY:QTY,
AFE:'AFE Number',
Finish: Finish,
Priority: Priority,
ShippingAddress:'Shipping Address',
'Need By Date': 'Need By Date',
Comments:Comments,
'Part Volume': 'Part Vol',
'Attachment Link':First(First(FinalInvoiceLines).Attachments).Value
}
);
)
Snippet of code to move files to sharepoint library inside of folder:
ForAll(
AttachmentsCard.Attachments As test,
UploadFileToDocumentLibrary1.Run(
ProjectName,PartName,
{file:
{
name: test.Name,
contentBytes: test.Value
}
}
)
)
Any ideas would be greatly appreciated!