Support for setvalue (or manually canceling automatic updating of "calculate", or encryption) in ODK?

Hi all,

I was wondering whether there was support for "setvalue" in ODK, and
if so, whether I could be provided with an example. In essence, I'll
be using it as a low grade form of encryption/obfuscation for numeric
data - setting a value that will be based on a response to one
question, and then either multiplied or divided by a static value or
another question response. I'll then be overwriting the response to
the first question. I've tried this tactic using "calculate", but
"calculate" updates itself whenever you change the original value.
Unfortunately, this means I can't use it for what I want.

I can see 3 possible ways around this problem, though I'm not sure
whether any of them are possible in the current ODK release/s:

  1. Using "setvalue", as this is treated as a one-off calculation, so
    won't update once I overwrite the original response.
  2. Using "calculate", but manually canceling the automatic
    recalculation (I'm not sure how to do this...).
  3. Using encryption, which I know is on the horizon somewhere, but I'm
    not sure whether a patch has been incorporated or has otherwise made
    its way into a release.

Any help you could provide would be greatly appreciated, though I'm
guessing that 1) and 2) above are the most likely solutions.

Thanks again,

Nick

  1. pretty sure setvalue isn't in the core. i couldn't find it in the
    source, but send an email to javarosa-developers to confirm.

  2. pretty sure you can't bypass the behavior of calculate. alex little
    had a similar issue that we solved at
    https://groups.google.com/d/topic/javarosa-developers/c3_mn-B-f3g/discussion.

  3. encryption is supposed to ship in a few months. as always, there
    are no guarantees.

what exact use case are you trying to address with this?

ยทยทยท On Tue, Nov 8, 2011 at 08:32, nick.marshall.cooper@gmail.com wrote: > Hi all, > > I was wondering whether there was support for "setvalue" in ODK, and > if so, whether I could be provided with an example. In essence, I'll > be using it as a low grade form of encryption/obfuscation for numeric > data - setting a value that will be based on a response to one > question, and then either multiplied or divided by a static value or > another question response. I'll then be overwriting the response to > the first question. I've tried this tactic using "calculate", but > "calculate" updates itself whenever you change the original value. > Unfortunately, this means I can't use it for what I want. > > I can see 3 possible ways around this problem, though I'm not sure > whether any of them are possible in the current ODK release/s: > > 1) Using "setvalue", as this is treated as a one-off calculation, so > won't update once I overwrite the original response. > 2) Using "calculate", but manually canceling the automatic > recalculation (I'm not sure how to do this...). > 3) Using encryption, which I know is on the horizon somewhere, but I'm > not sure whether a patch has been incorporated or has otherwise made > its way into a release. > > Any help you could provide would be greatly appreciated, though I'm > guessing that 1) and 2) above are the most likely solutions. > > Thanks again, > > Nick > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >