Extract first number of phone number

I want to check whether a phone number in a field starts with a 0. Is there a function that can filter out the first number to be able to check wheter it is a 0 or another number?

You could use an integration like zapier or more preferably make.com.

so instead of setting column values when your user presses submit, make a custom action to send a webhook to make.com with the necessary information, then use a filter there to set variables and do what you need it to do. Then add a new row.

1 Like

You can use the “check text matches” or “text slice” column. Display warnings using the hint component and set the visibility according to what you want to achieve. If you use “check text matches”, you can even check more using regex, for example: the number of digits after the first number.

1 Like

image

Here’s an alternative with JavaScript.

return /^0/.test(p1)
1 Like

image

Here’s “Check text matches”.

2 Likes

Thank you so much. This is very very helpful.

I was checking all the documents on how to use these computed experimental text fields as I was suspecting that it might work with one of these, but could not find any. Is there any documentation on these so that I can do my own research before asking here?

As far as I know, there isn’t specific documentation for experimental features like computed experimental text fields. However, they are relatively easy to use as long as you’re willing to follow the instructions and give them a try.

1 Like

There is this:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.