Button disabled when lookup field has value

I am trying to create a button that when clicked, opens a gmail link and populates the email address and body. My table has a lookup field called “PrimaryContactEmail” that simply pulls from the link record “Primary Contact” and brings in the email so that I can reference it in my formula.

The formula I am using is:

https://mail.google.com/mail/u/0/?view=cm&to=
& ENCODE_URL_COMPONENT(PrimaryContactEmail)
& “&su=”
& ENCODE_URL_COMPONENT(“IPM Scoutek Demo Devices Shipped”)
& “&body=” & ENCODE_URL_COMPONENT("…")

The weirdest thing happens though. For rows that HAVE a value in PrimaryContactEmail, the button is disabled (greyed out) but if the PrimaryContactEmail is empty, the button is clickable!

I thought MAYBE this is some kind of spam prevention thing, preventing me from emailing users outside of the base, but experiments (such as switching to the phone number) show the same behavior.

Please see attached image.

Why this conditional button behavior, I have no idea. The weirder thing is that the button is clickable when the data is NOT present. If anything you would expect the other way around.

Lookup fields return as arrays and you need a string value. Try replacing PrimaryContactEmail with PrimaryContactEmail&''

Success! I learned something today. Thank you.

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