Hi,
Problem Statement: In a SharePoint list, I am customzing a form. I want certain validations for onSave event. Like whenever a user clicks on save button, if a toggle is checked, attachments will be mandatory for him to upload.
I tried executing the following formula on onSave event of powerapps:
If(_checkedToggleCount> 0 && IsEmpty(DataCardValue69.Attachments), Set(warningText, "Attachments Missing"), _checkedToggleCount= 0, SubmitForm(SharePointForm1) )
If a user clicks on save without uploading an attachment, a label is updated with the correct text.( first part of the formula),
But then if user tries to upload attachment and save the item still the item is not saved.
I have just started with powerapps formuals, any idea where I could be going wrong?

Report
All responses (
Answers (