Forum Discussion
omergunduz
Aug 26, 2024Copper Contributor
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 t...
- Aug 28, 2024
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.
michalkornet
Aug 28, 2024Iron 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.
- omergunduzAug 29, 2024Copper 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.