Hyphen in email address or text file causes Arithmetic error

Hello,

Appsheet newbie. I was not able to find an answer in the community, but I am sure someone has come across this before. When an expression contains an email address that has a hyphen (e.g. Alex@learn-cars.com) , Appsheet throws an error that indicates an arithmetic error.

This also applied in a situation where a Long Text column, threw a ‘token expression error’ because of some text characters that are part of a link that is required, as text, in the Long Text field.

Is there a way to indicate that all of the items in an expression or a text field are text?

Thanks,

Alex

Is it possible that you can share the expression containing the email?

In general , I believe you could use the email address as below

IF([Email]=“Alex@learn-cars.com”, “Good format”, “Bad format”)

Please observe the double quotes around the email address.

Alex:

This also applied in a situation where a Long Text column, threw a ‘token expression error’ because of some text characters that are part of a link that is required, as text, in the Long Text field.

I believe you could share more details about this observation, so that community could help you better.

1 Like

Hi Suvrutt,

Email Address

It appears the double quotes around the email address solved the arithmetic
error issue in the workflow action. Without the double quotes, the hyphen in
the email address for the workflow action broke the app.

The error came up when the email, with the hyphen, was placed in the
following section of the Workflow Actions

To

Send email to these email addresses. (Expressions that yield email addresses
are supported.)

The double quote around the email address seems to be working.

Token Error

One of the column types in our app is Long Text and there is a segment of
text that will always be the same, so we wanted to use the Initial Value
function. Even though there are double quotes around the entire text
segment, it appears that part of the string is being evaluated as an
arithmetic function (i.e. specifically 78"/200cm). However ’ 78"/200cm ’ is
part of the link that want to appear in the text field. The entire text
segment is below:

Text placed in Initial Value Expression

"Canon Rebel SL3 Digital Camera with 18-55mm Lens, Black

1?dchild=1&keywords=Canon
+Rebel+SL3+Digital+Camera+with+18-55mm+Lens%2C+Black&qid=1602428399&s=electr
onics&sr=1-1

BOYA BY-MM1 Video Microphone Youtube Vlogging Facebook Livestream Recording
Shotgun Mic for iPhone 11 Samsung Canon G7X Mark III Nikon Sony RX100 VII
A6400 Cameras DJI Osmo Mobile 3,for GoPro 5 6 7 8 ZHIYUN Smooth 4

00?ie=UTF8&psc=1

K&F Concept Camera Tripod 78"/200cm DSLR Tripods Aluminum Travel Vlog Tripod
Monopod with 360° Panorama Ball Head 1/4" Quick Release Plate Carrying Case
Loading Up to 17.6lbs/8kg for Canon Nikon

02?ie=UTF8&psc=1 "

The error message reads:

Arithmetic expression ‘(“Canon Rebel SL3 Digital Camera with 18-55mm Lens,
Black

1?dchild=1&keywords=Canon
+Rebel+SL3+Digital+Camera+with+18-55mm+Lens%2C+Black&qid=1602428399&s=electr
onics&sr=1-1 BOYA BY-MM1 Video Microphone Youtube Vlogging Facebook
Livestream Recording Shotgun Mic for iPhone 11 Samsung Canon G7X Mark III
Nikon Sony RX100 VII A6400 Cameras DJI Osmo Mobile 3,for GoPro 5 6 7 8
ZHIYUN Smooth 4

00?ie=UTF8&psc=1 K&F Concept Camera Tripod 78”/“200cm DSLR Tripods Aluminum
Travel Vlog Tripod Monopod with 360° Panorama Ball Head 1”)’ has inputs of
an invalid type ‘Unknown’

Thanks,

Alex

Thank you.

Could you mention what text exactly you wish to place in the initial value. If you are trying to place a combination of images, hyperlinks and text in one long text column then I believe it not possible.

Long text columns as the name suggests contain long text strings. So for example following could be tried to be placed in a long text column. Please observe the double quotes.

“BOYA BY-MM1 Video Microphone Youtube Vlogging Facebook
Livestream Recording Shotgun Mic for iPhone 11 Samsung Canon G7X Mark III
Nikon Sony RX100 VII A6400 Cameras DJI Osmo Mobile 3,for GoPro 5 6 7 8
ZHIYUN Smooth 4”

1 Like

Hi Suvrutt,

The text that I would like to place in the Initial Value column is below. It
is a simply a product name and a link to the webpage. I placed double quotes
around the text, but the token error was still occurring. Below is the text
segment that I wanted to insert as an initial value.

“K&F Concept Camera Tripod 78”/200cm DSLR Tripods Aluminum Travel Vlog
Tripod Monopod with 360° Panorama Ball Head 1/4" Quick Release Plate
Carrying Case Loading Up to 17.6lbs/8kg for Canon Nikon

02?ie=UTF8&psc=1 "

Update

I figured it out. In the Initial Value, AppSheet interpreted the ’ / ’ as
a division function. When I added ’ & ’ symbols and addition double quotes
to the string, I was able to input the text string into the Initial Value.

Solution

“K&F Concept Camera Tripod 78”&“”/“200cm DSLR Tripods Aluminum Travel Vlog
Tripod Monopod with 360° Panorama Ball Head 1/4” Quick Release Plate
Carrying Case Loading Up to 17.6lbs&"/"8kg for Canon Nikon

https:/"/www.amazon.ca/gp/product/B07VLL925P/ref=ppx_yo_dt_b_asin_title_o08_
s02?ie=UTF8&psc=1 "

Thanks,

Alex

1 Like

Hi @Alex ,

Excellent. Great to know you got it.

My earlier suggestion was for one hyphen but if there are multiple quotes and similar “special” characters in a string that are also used in arithmetic operations , one needs to make use of concatenation (&) and use of double quotes.

3 Likes

Hi Suvrutt,

Thanks. That makes sense.

Alex

1 Like