Forum Discussion
Making Attachments Mandatory for List Items on Power Apps
Hello,
I am trying to make newly added list items with attachments mandatory and have written the following formula for a customized Power Apps form.
However, when I attempt to use this form, it returns the following error, and I am unable to save a new item.
Does anyone have an idea about what is wrong?
Thnx in advance!
Hi omergunduz, I have checked it on my environment and it looks like this code is working.
I use a comma as a parameter separator in my language.
If(IsEmpty(DataCardValue2.Attachments),Notify("Please fill out the attachment field.", NotificationType.Error),SubmitForm(SharePointForm1))It shows this error when attachments are empty. Otherwise, it saves the form.
- michalkornetIron Contributor
Hi omergunduz, I have checked it on my environment and it looks like this code is working.
I use a comma as a parameter separator in my language.
If(IsEmpty(DataCardValue2.Attachments),Notify("Please fill out the attachment field.", NotificationType.Error),SubmitForm(SharePointForm1))It shows this error when attachments are empty. Otherwise, it saves the form.
- omergunduzCopper Contributor
michalkornet Thanks for the response! Actually, you are right. My script was working. I don't know why, but it took hours for SharePoint to detect my modifications. The next day, it was working properly.