Hello,
I'm trying to use an expression to evaluate if a decimal field is empty or not in Survey123. I have found this option :
(string-length(${latitude}))>0
Unfortunately, this returns the "string-length(${latitude})" portion of this expression returns a value of 0 whenever I try to enter a decimal value.
Example: decimal not working
example: integer works
I have tried these altenatives without sucess:
Can anyone help me finding a way to identify empty decimal fields ?
Kind regards,
Anne-Marie
Checking on numbers can get tricky. Have you tried ${latitude} != '' yet? Any empty field is usually empty string, even numbers.
Yes I tried that already and it does not work.
What about = 0 or != 0 that sometimes works for me.
That doesn't work either. The thing is is that the available expressions don't seem to make a diffrence between an empty field OR a decimal field.
Hi
Try first converting it to a string and then checking it's length:
string-length(string(${latitude}))=0
Still same issue. It only works for integers.