Create a Custom Error Message

Hi there,

I’m new to Glide and am just playing around with some functionality.

In a form in Glide, I ask the user their age (X) followed by asking them their planned retirement age (Y).

I need to do one of two things:
(I) Prevent the user from entering a value (Y) which is less than (X)

or

(II) Alert the user with a custom error message to let them know that they must enter a value (Y) which is higher than (X)

Is there an elegant way of doing this? The if-then-else functionality seems to be limited to comparing values to absolutes, rather than to each other.

Thanks!

At the current time what you are trying to accomplish in Form entry is not possible.

You would need to use a variety of components that are configured to be visible only if your number values are valid. I did something similar in my experiments app:

experiments.glideapp.io

In the first tab (Age/Name Filter) try putting a value for max that’s lower than the min. You should get a message.

What this doesn’t do, unfortunately, is prevent the user from submitting a form (if this were a form and not just displaying data).

@Robert_Petitto’s ideas might work if you make the user enter ages first, and if the data is valid (simple math between the ages to calculate a value that’s above or below zero), then show a form button. Then use the column values to pull in the entered ages from the previous screen.

@Jeff_Hager…would this be a form button within a form button?

No I’m thinking like your example where the entry fields are on a detail view screen. Instead of your list showing it showing a message, it would show a button. Right now you can’t do the calculation in a form because the data needs to be written to the sheet first for the glide math column to work.

Thanks for your answers, guys.

I feel like having some basic data validation capability would be a decent feature request for Glide.

1 Like