Microsunlight_Products_Supporting_Docs is the table containing multiple files for a product, since in dataverse file column can have only one file, Microsunlight_Products_LookUp is the lookup field.
ForAll(
col_AllAddDocs As MyAttachment,
Patch(
Microsunlight_Products_Supporting_Docs,
Defaults(Microsunlight_Products_Supporting_Docs),
{
ID: MyAttachment.Name,
Microsunlight_Products_LookUp: LookUp(Microsunlight_Products, Microsunlight_Product = _NewItem.Microsunlight_Product) ,
Doc: {
FileName: MyAttachment.Name,
Value: MyAttachment.Value
}
}
)
);
Clear(col_AllAddDocs);
On attachment addfile, removefile, undoremovefile add
ClearCollect(col_AllAddDocs, Self.Attachments)
No comments:
Post a Comment