I want to check if a column (a phone number) is a number, so on Google sheet, I use a formula like this: =IF(ISNUMBER(D2),“true” , “false”). How do I do the same thing on Glide table column? I checked all the options, couldn’t find anything.
If you only want to allow digits, then you can configure the column type as “Number” in Glide and it will ignore any non-digits.
Glide also has a Phone Number column type, but I don’t think it does any validation.
But phone numbers can contain more than just digits: +() - and spaces are all generally considered valid characters in a phone number - do you also want to allow those, or strictly digits only?
To do the same thing that your current Google Sheet formula does, and return a true/false result, you can use the Check Text Matches plugin:
If you wanted to extend that a bit to allow for extra characters, then you could use the same plugin and modify the regular expression slightly:
([^\d\s\-\(\)\+]+)
This can become a bit of a rabbit hole though. For example, a plus (+) is usually okay in a phone number, but only at the start. So +1 888-3456 would be a valid phone number, but 1 888 +3456 would not. It just depends how far down the rabbit hole you want to go
This is great! I just want to allow numbers. A bit confused about how the plugins work. Do I still need to install it or can I find it on column options?
Just create a new column in the Data Editor, and you’ll find all the plugin columns at the bottom of the list of column types. Once you select one, it will have input boxes for the expected parameters. In some cases, this can be another column, and in other cases a text input is expected.
Yes, I looked at all of them and couldn’t find anything like “text match” or any sort of validation action. What should I look for specifically @Darren_Murphy ?
There are an awful lot of them, we are spoilt for choice these days
Usually what I do is head over to the Plugins section in the Glide Docs first to find the one I want and do a bit of testing, before I look for it in the GDE.
How would you validate a WhatsApp number? i can accept it with or without + in the beginning or to keep it simple just validate the amount of numbers but that varies as well …
Thank you so much, if I enter a number with + into the Glide database, the + sign seem to change to a - Weird. I also changed the amount to 12 characters because looks like some numbers are this long…