wsharba / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 1 forks source link

Select one minimal with calculation not updating shown value when calculation changes #1030

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'll add a sample form later (leaving for holiday). Same issue in Enketo is 
described here: https://github.com/MartijnR/enketo-core/issues/195

I think using a calculation on a readonly question probably should be supported.

Original issue reported on code.google.com by mart...@enketo.org on 7 Jul 2014 at 6:05

GoogleCodeExporter commented 9 years ago
Do you have an example of this?

Original comment by mitchellsundt@gmail.com on 8 Aug 2014 at 12:32

GoogleCodeExporter commented 9 years ago
Sorry forgot. Will create one!

Original comment by mart...@enketo.org on 8 Aug 2014 at 12:44

GoogleCodeExporter commented 9 years ago
Here it is. (P.S. for Enketo this is considered a pretty low priority).

Original comment by MRi...@gmail.com on 8 Aug 2014 at 5:24

Attachments:

GoogleCodeExporter commented 9 years ago
Interesting. 

I assume select1 is used just to control how the value is presented - e.g., in 
a selection list rather than an edit field?

i.e., there is no other functionality in play -- this could be a type 'string' 
field if that field had an appearance attribute that would present the result 
in a style/widget that looked like a drop-down list?

Original comment by mitchellsundt@gmail.com on 8 Aug 2014 at 7:10

GoogleCodeExporter commented 9 years ago
yes indeed, though it would work in a non-readonly field, I don't think that 
use case makes sense (because the user input can be overridden at any time by 
the calculation).

Indeed the user that brought this up did this as a way of showing some result 
from a list of possible options in a quite clever way.

I think the key here is that the possible options are defined in a (long) 
options list as opposed to a long formula. So, I don't think the type=string 
with a select appearance would work for this use case.

Original comment by mart...@enketo.org on 8 Aug 2014 at 7:34

GoogleCodeExporter commented 9 years ago
Ah, OK. The value is chosen via the calculate, but the display text is mapped 
through the choices list, and potentially through a translation layer.

Clever. 

This is an interesting usage, but would be a low priority fix within ODK 
Collect.

Original comment by mitchellsundt@gmail.com on 9 Aug 2014 at 12:53