Hi @WarrenBelz
Thank you for your reply.
I found another thread you replied to regarding removing the last attachment (unsaved) in the control if the file extension was not of a certain type and you said it always looks at the second last one... I think that's a bug in the attachment control.
I see the same thing when I try to change the color of the attachments using ItemFill. If I have 2 saved already and then add a new one (unsaved), the unsaved attachment does not pick up color from ItemFill or AddedItemFill.
ThisItem.Attachments.Name is an invalid reference... so I've been trying ThisItem.Name. When I use this, the formula is valid, however it's never true...
If(Right(ThisItem.Name,3) in colValidImageExt,Color.Blue,Color.Red)
Again, if I have 2 attachments already saved for the record and add a new one (unsaved) the first 2 are Red and the unsaved is white even if I put the same formula in AddedItemFill.
interesting note: If I put a Notify(ThisItem.Name) on the OnAddFile, the message is my email address....NOT the name of the attachment... very strange... BUT if I do this, I do get the correct response:
If(Not(Right(ThisItem.Name,3) in colImageType),Notify(...
I made a gallery with Items of the Attachment control. I was able to use the same formula and return true or false for each record, even the unsaved one! So the formula works, it just doesn't work in the Attachment Control.
I also tried 'File Name With Extension' with no success.
So for now I've abandoned this as I'm convinced the attachment control has bugs.
have a great weekend!