How to remove Zero infront of Mobile Number

Dear All, I am trying to create a Whatsapp Link for my colleced numbers, but I am having issuw with First-Zero in front of collected Mobile Number.

Collected: 03244398887

So want to create whatsapp link like as follows,

https ://api.whatsapp.com/send?text=923244398887

which does not contain leading zero. I have currently used following method in action field, but it will add “Zero” of mobile number.

image

Above Action will create something like this
https ://api.whatsapp.com/send?text=9203244398887

Actual Desired Link is as follows,
https ://api.whatsapp.com/send?text=923244398887

Any help will be much appreciated.

Hi @k86305,

Welcome to the forum!

There are couple of things you can do:
(1) change the mobile number field type to Number. With this, all numbers entered by users will be stored in numeric format, which will automatically remove all leading 0s.
Though you can face the opposite problem - may be some time you will need to have 0 at front :slight_smile:
(2) you can create a custom action and use service like Integromat to modify mobile number string according to your needs. Each call will cost some credits though, so if your users are using this link 10000s times per month, this will cost some $$.
(3) you can use input filtering / masking components when you create mobile number so that you store it in desired format. There is one component in the Marketplace, also there are some custom components built by NoCodeMonkey.io (@Michael has more info on that).

Best regards, Victor.

1 Like

Thanks @Victor , I tried the option number (1), it correctly removed leading “0” (zero), but when I tried to use it as whatsapp link (https://wa.me/92{data}) then it added commas in the number like https://wa.me/923,244,398,887. So could not fix that issue.

So currently I have added a new field for WA mobile number without leading zero. But that will put extra load on the users, who want to add a new record.

Thanks for your valuable time, and consideration. Really appreciated!

Regards
Kashif

Hi @k86305,

In order to remove commas, you need to change the number formatting to “None”. You can do it at a time you put this number to WhatsApp link (there should be a pen to the right of the magic text variable name).

Best regards, Victor.

About this… In my app i have linked the button to do a call. The problem is that in Italy, most of home numbers start with 0, so the numeric field automatically remove the 0. Exemple 033193333 become 33193333 (not valid=error) so the only fix for that is putting a text field instead of numeric, that works.

Thanks @Victor , that was right on target. It worked very well. But as you said before that I will have issues with numbers which do not have zero in the start. So now my system will add “zero” to such number too like Medic help line is 1122, and i will un-necessarily add zero to make it 01122.