How to display another question when the first question is not filled or empty question can be in (decimal or text )-type

1. What is the problem? Be very detailed.
I have two variable weight and height are in (decimal-type) and , what i want when someone doesn't fill weight or height odk collect shows another question which will be (select unknown if you don't know weight or height

2. What app or server are you using and on what device and operating system? Include version numbers.
Xlsx-form, Odk collect

3. What you have you tried to fix the problem?
I'm trying to add a question when someone doesn't fill weight and height questions

4. What steps can we take to reproduce the problem?
You can show me the proper code or send me a proper sheet with relation of the problem

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

1 Like

Hi @Melkiory
all you need is make that question Relevant, if one of previous answers was empty. If the docs I linked is not enough you should be able to find a lot similar problems on this forum.

I have got the code from certain thread around the forum

Test for empty questions with ${var} = ''.
code by @yanokwa but they are not working at all

If it doesn't work that means you made a mistake somewhere. You can attach your form because otherwise it;s difficult to tell what's wrong.

Okay this one is here
Skip_when_empty.xlsx (10.4 KB)

The expression you use in relevant is wrong: ${Q11}=". it's one double quote and dot? It should be like ${Q11}="".

Thank you but still doesn't work i tried it brings error bad node javarosa

How come? I tested it... please attach your final form.

This one here Skip_when_empty.xlsx (10.8 KB)

and this also Skip_when_empty.xlsx (10.8 KB)

So still you have a dot after the expression ${Q11}=" ". and redundant space between "", please get rid of it and try again.

1 Like

Ooh i have try but it seems the same or what happen is Screenshot_20200526-1530221.jpeg|312x500 at bottom of the form it shows the error

Still because of a dot you have at the end of the expression it's visible even in the screenshot you attached.

Thank you Mr @Grzesiek2010 it's now working perfect