Hi all,
I am making an accident reporting app for company stores/Health and Safety. If an accident happens on site the injured party, any witnesses, and the manager of that store fill in the form and the manager then submits it. The data is populated into a SharePoint list. The manager can attach files, or supporting documents, using the Attachment Control which are then stored in the list with the item.
Is there a way in PowerApps to restrict/prevent the user from attaching or submitting certain file types, e.g. executable files? I have tried this solution but to no avail.
Many thanks.
Solved! Go to Solution.
Hi @Anonymous
Do you want to restrict user to submit the attachment type?
I think you can try the following workaround,I test as next:
Add one label and rename it as LabelWarning,
Label.Warning.Text="There is jpg file in attachment,and you aren't permitted to submit thie type,please try again!"
Label.Warning.Visible=If(".jpg" in Concat(DataCardValue6.Attachments.Name,Name&","),true)
LabelWarning.Color=Red (I try to restric .jpg attachment type file)
IconAccept1.Visible=!LabelWarning.Visible
IconAccept1.OnSelect=SubmitForm(EditForm1)
Then check:
Hope this workaround could be helpful.
Best Regards.
Yumia
Hi @Anonymous
Do you want to restrict user to submit the attachment type?
I think you can try the following workaround,I test as next:
Add one label and rename it as LabelWarning,
Label.Warning.Text="There is jpg file in attachment,and you aren't permitted to submit thie type,please try again!"
Label.Warning.Visible=If(".jpg" in Concat(DataCardValue6.Attachments.Name,Name&","),true)
LabelWarning.Color=Red (I try to restric .jpg attachment type file)
IconAccept1.Visible=!LabelWarning.Visible
IconAccept1.OnSelect=SubmitForm(EditForm1)
Then check:
Hope this workaround could be helpful.
Best Regards.
Yumia
This is perfect! Thank you very much! 🙂
User | Count |
---|---|
256 | |
114 | |
95 | |
48 | |
38 |