Checking value before updating

I want to attach a file to a thing but need to check if the thing already has an attachment. If an attachment is already present then this process should abort - maybe inform the user that only one attachment is allowed. How do I do this in bubble?

Hi there, @bwmuriru… if I understand your post correctly, what you are describing is more about the user experience than it is about aborting a workflow. To elaborate, if a thing already has a file associated with it (maybe you have a field of type file, and that field is not empty for a particular thing), you can know that, of course, and you can add conditions on the front end that simply don’t allow the user to add another file (i.e., it’s much better to stop the user from trying to add another file than it is to let them try and then tell them they can’t do it). You could also conditionally display a message to tell the user that only one attachment is allowed so they aren’t confused as to why, say, the attachment icon has disappeared once there is a file attached.

Hope this helps.


1 Like

That helps a lot and is certainly far easier to implement. Guess I was overthinking matters!
Thanks a lot Mike.

1 Like