SubmitForm(EditForm);
ResetForm(EditForm);
Set(UserPhoto, Blank());
// Combine attachments from both controls into a single collection
ClearCollect(
CombinedAttachments,
DataCardValue23.Attachments,
DataCardValue29.Attachments
);
// Ensure the combined collection is formatted as a table of attachments
ClearCollect(
FormattedAttachments,
ForAll(CombinedAttachments, {Name: ThisRecord.Name, Value: ThisRecord.Value, DisplayName: ThisRecord.Name})
);
// Patch the combined attachments to the SharePoint list
Patch(
CVRecords,
Defaults(CVRecords),
{
Attachments: FormattedAttachments
}
);
The errors in the expression are that the Patch function is receiving a Table type argument '{Attachments}' instead of the expected 'Table (Attachment)' type.

Report
All responses (
Answers (