episphere / quest

experimenting with the idea of a questionnaire markup
https://episphere.github.io/quest/
2 stars 11 forks source link

exists function does not handle complex objects correctly #416

Closed danielruss closed 1 year ago

danielruss commented 1 year ago

in the following example, _exists("D_728155643.D728155643") returns true even if I still live here is not selected because if "D_728155643" exists, the function returns true. need to fix around line 55 in questionnaire.js

[X] LALA

[D_728155643?] What year did you move out of|

If you still live at this address, select “I still live here.”
Year moved out |__|__|__|__|id=D_943813942|

[678602069*] I still live here

[END] all done |displayif=valueEquals("D_728155643.D_728155643","678602069")| I still live here ||displayif=exists("D_943813942")|{$D_943813942}|
KELSEYDOWLING7 commented 1 year ago

@danielruss would you be able to give some context to the fix? I'll need Jake to adjust the flattening of these 33 variables on order for me to see the backend data