Hi @rmaziwis ,
Do you want to active "Send" button only after you submit your form data successfully?
Based on the needs that you mentioned, I think a collection table variable could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
Set the OnSelect property of the "Save" button to following:
SubmitForm('Vehicle attachment Form');
If(
'Vehicle attachment Form'.ErrorKind=ErrorKind.None,
Navigate('Attach vehicle incidents',ScreenTransition.None)
)
Set the OnSuccess property of the 'Vehicle attachment Form' to following:
ClearCollect(AttachmentsCollection, 'Vehicle attachment Form'.LastSubmit.Attachments);
Set the DisplayMode property of the "Send" button to following (If you do not attach attachments for the submitted record, this "Send" button would also be disabled) :
If(
!IsEmpty(AttachmentsCollection),
DisplayMode.Edit,
DisplayMode.Disabled
)
set the OnSelect property of the "Send" button to following:
Office365Outlook.SendEmailV2(
TextInput1_4.Text,
TextInput2_1.Text,
TextInput3_1.Text,
{
Attachments: ForAll(
RenameColumns(AttachmentsCollection, "Value", "Value1"),
{
Name: DisplayName,
ContentBytes: Value1,
'@odata.type': ""
}
)
}
);
Reset(TextInput2_1);Reset(TextInput3_1);
Clear(AttachmentsCollection) // Clear the AttachmentsCollection table
Please consider take a try with above solution, then check if the issue is solved.
Best regards,