Convert number to whatsapp link

Hello ALL…

Is anyone have an idea how to convert this.
I am going to ask users to add their phone number.
Once it is recorded on table or GS i need to add the whatsapp web link which always have this pattern: ‘Share on WhatsApp’ where the first numbers (or number) is the number of the country.
I guess it is something related to strings. Once the string is built should it be “passed” to an url column so I can call it in a component?
In my project it will be a button with the label CONTACT THE SELLER

You can built that using a template column. I don’t know if the country code is part of the number column or in a separate column. If it isn’t then it’s as simple as building a template column like this:

https://wa.me/{number}

And create a replacement for {number} to point to your number column. That template column will be your url.

6 Likes

Thank you Jeff …
Wonderful !!! :grinning: :grinning:

1 Like

@Jeff_Hager Yesterday that seems to me so obvious but I did not had a chance to try it. Today, yes, but I couldn’t figure it out. I only have about 10 days experience… :smirk:
I’ve done all the process but I am missing something.
If someone else tried what explained Jeff, could you share plz?

Remove spaces, remove +, -, (, ) from the number.

3 Likes

I tested and it’s working good.

image

Put the Precision to 1 and untick the group separator of that Phone Number column and see @jabid

2 Likes

I have done that… but my problem is related to template column, can you show me your example?

image

image

2 Likes

It does not store the replacement on my column.

Looks like you are using the phone number from the user profile and you are previewing the app as Hounaiine (sorry about spelling). Does that user have a phone number on their user profile?

1 Like

No it has not but I changed that and the problem persists.

Changed what? The value you are setting for the replacement needs to be populated with something. If it’s empty, then it’s going to replace with an empty value. I don’t know what else to tell you. Based on what you showed in your screenshots, I can only assume that the phone column in the user profile for the user you are previewing as is empty. I can’t see what’s in your users table, so I don’t know of there is a value or not.

1 Like

OK. The cell is not empty here is the the table of users the last one is the the one I try to contact via whatsapp try to contact via whatsapp

The column in your user sheet is named ‘number’.

In your template column, your replacement is referring to a column named ‘phonenumber’ in your user sheet.

Something isn’t making sense, because your the template column should be pointing to the column named ‘number’.

Are you sure you have your user profiles set to the correct table?

As you can see in my new try when changing "numberphon"e by “number”
there a kind of a bug since when I enter the replacement in template column I have my own phone that is displayed automatically

Sorry l should have mentioned it before my previous post.

Of course last column should be deleted. It has nothing to do here.

Of course it’s going to be your number. You are pointing the replacement to the user profile, so it’s always going to pull in the number of the signed in user.

OK; i AM CLOSE to get it. So, where should it point ? I need to point the users’s number who sent the post

IT WORKS. Thanks a lot.
I understood what happened.
I could not find the right fake user I created because when you create a user with google login it gives different emails so the cell was empty.
Thank you so much for the time spent to help.
I’ll repay you :slight_smile: I’m still new but I know a lot about concepts …

1 Like