Re: Special Characters in attachments file name
Hi @LindseyT You can use IsMatch function.
ForAll(
NameOfTheAttchmentControl.Attachments As var,
If(
IsMatch(
var.Name,
"([_^+&\-\/()])",
MatchOptions.Contains
) && !IsEmpty(NameOfTheAttchmentControl.Attachments),
ClearCollect(
col_IssueInFileName,
{Name: var.Name}
)
));
If(CountRows(col_IssueInFileName)>0, Notify("Invalid Name", NotificationType.Error), UploadCode)
So, basically, I am considering that you have are allowing multiple attachments. And I am using these "([_^+&\-\/()])" characters as invalid. You can add your own characters. So, if any file name contains these character, then that file name is added into collection and if the CountRows of that collection is more than 0 then you can thrown the error.
You can have modify this code as per your requirement.
-----------------------------------------------------------------------------------------------------------------------------
I hope this helps.
Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍
Thanks,
ANB