build icon indicating copy to clipboard operation
build copied to clipboard

Better document the differences with ${xlsform} style interpolation

Open drinckes opened this issue 5 years ago • 3 comments

When building a form using the spreadsheet/XLSForm approach, you reference other fields with ${field_name}, e.g.:

not(boolean(${gps_location})) or number(${gps_location})>15

But when specifying them in the online builder, I have to reference them with /data/field_name, e.g.:

not(boolean(/data/gps_location)) or number(/data/gps_location)>15

Is this correct? I couldn't find this in the documentation - did I just miss it?

drinckes avatar Jan 10 '19 14:01 drinckes

yeah, that's correct. xlsform sort of invents its own syntax to try to make things easier. when odk build was created (ten years ago!) i was shy about doing that sort of thing and just stuck as close to actual xforms as possible.

the documentation doesn't really talk about this much because.. it sort of used to just be the normal way of doing things! i don't think anybody really anticipated that xlsform might be so successful that people would learn it first and then have to switch to xforms to do stuff.

issa-tseng avatar Jan 10 '19 21:01 issa-tseng

Thanks Issa, the documentation refers to accessing variables using the xlsform syntax, so it was really hard to work out what I had to do in the online editor. Any thoughts about where a note would be useful - in that doc or in the help for the online builder?

drinckes avatar Jan 11 '19 11:01 drinckes

oh wow, i see. probably both?

issa-tseng avatar Jan 11 '19 20:01 issa-tseng