How can I select what type of files I can add to the DataCard? With the command:
Form1.Updates
I add all files to the SharepointList, but how can I specify only graphic files?
You can't specify exactly, but you can prevent submission while there are any files that don't match the types you want.
I would have a label underneath the attachment control and then use that to display whether there are any non-allowed file types, then you make your submit button only enabled if that label has no text in it
For the label, I would use something like:
If(
CountRows(
Filter(
DataCardValue38.Attachments,
Right(Name, 3) <> "jpg"
&&
Right(Name, 3) <> "bmp"
&&
Right(Name, 3) <> "png"
&&
Right(Name, 3) <> "gif"
&&
Right(Name, 3) <> "webp"
)
) > 0,
"There are non-image files in your attachments, please remove these in order to continue"
)
Cheers,
Sancho
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.