This also works:
IF(
AND(
Phone,
{Phone Extension}
),
IF(Phone, Phone, {Phone Extension}),
IF(Phone, Phone, {Phone Extension})
)
But this strangely shows an error:
IF(
AND(
Phone,
{Phone Extension}
),
IF(Phone,
'tel://' & VALUE(Phone),
'tel://' & VALUE({Phone Extension})),
IF(Phone,
'tel://' & VALUE(Phone),
'tel://' & VALUE({Phone Extension}))
)
Anyone have any ideas?
Welcome to the community, @gmclelland! :grinning_face_with_big_eyes:
This logic is a bit odd. If both exist, then there’s no need to test again to see if {Phone} exists because its presence is already assured by passing the “if both exist” test.
I was able to simplify your formula, and get the “tel://” prefix to work. Here’s what I came up with:
IF(
OR(Phone, {Phone Extension}),
"tel://" & VALUE(IF(Phone, Phone, {Phone Extension}))
)
If either {Phone} or {Phone Extension} exist, the formula starts with the “tel://” prefix. To that prefix, it will add the value of either {Phone} or {Phone Extension}, with {Phone} taking priority by being tested first. By the time that inner test arrives, the formula knows that one of the two is there, so it’s a simple process of elimination. If the initial OR() test fails, then nothing else happens.

Notice that the {Phone} field is the phone number field type, and “Phone Extension” is single line text. My gut says that one of those two fields is a number field in your base. If so, that explains the error. The VALUE() function requires a string, and throws an error if you feed it a number.