rubenarslan / formr.org

Chain simple surveys into longer runs to build complex studies. Use R to generate pretty feedback and complex designs.
https://formr.org
Other
131 stars 36 forks source link

get parameter unintuitive behavior #476

Closed rubenarslan closed 2 years ago

rubenarslan commented 2 years ago
dgromer commented 2 years ago

To specify a bit:

(That's what we discussed in the Google group)

However, I did a little more testing and found some more unexpected behavior:

Thus in one case I have to use is.na() and in the other case == "" to check if the variable is empty.

rubenarslan commented 2 years ago

Hi @dgromer apparently @cyriltata cannot replicate this problem following your verbal explanation. Could you provide a run export of your tests that clearly shows the bug?

dgromer commented 2 years ago

Here's a run that returns NA: https://get-url-parameter-test-label.formr.org/ And here's one that returns "": https://get-url-parameter-test-nolabel.formr.org/

One note: either the problem turned around or I described it the wrong way around the last time. The study with an empty "label" column returns NA, the one with text in the label column returns "".

Please find the JSON files of the runs including the study details here: get-url-parameter-test.zip