Select to view content in your preferred language

NaN calculate field in mobile app, but works in S123 Connect

1435
2
Jump to solution
07-17-2021 01:30 PM
MGAL
by
Emerging Contributor

I designed a question to calculate a "time as text field". For example, the user enters in how many minutes & seconds (two separate fields) it took them to complete a task. The purpose of the field is to display minutes & seconds as "mm:ss". 

I observed that the formula works as expected in Survey123 Connect. However, when I use the mobile app (in Google Chrome, Android 11), the field only shows as NaN. 

MGAL_0-1626553661193.pngMGAL_1-1626553795865.png

 

Thoughts on this? Happy to provide more info as needed.

 

Cheers! -M

0 Kudos
1 Solution

Accepted Solutions
Jim-Moore
Esri Regular Contributor

Hi @MGAL 

What calculation are you using to concatenate the mm:ss string? Note that in the web app, the concat() function is the way to go for concatenating strings (the "+" operator will return NaN). So your calculation could look something like

concat(${minutes},':',${seconds})

The Formulas documentation has more info on functions.

Hope this helps. Best, Jim

View solution in original post

2 Replies
Jim-Moore
Esri Regular Contributor

Hi @MGAL 

What calculation are you using to concatenate the mm:ss string? Note that in the web app, the concat() function is the way to go for concatenating strings (the "+" operator will return NaN). So your calculation could look something like

concat(${minutes},':',${seconds})

The Formulas documentation has more info on functions.

Hope this helps. Best, Jim

MGAL
by
Emerging Contributor

@Jim-Moore 

 

Much appreciated. This was for a smaller project that slipped off my radar. Thanks for your insight. 

 

-M