Collect: Error with calculate value when used in constraint_message

Created on 12 Apr 2017  Â·  6Comments  Â·  Source: getodk/collect

Collect v1.5.1, on a Nexus 7 running Android 5.0.2

I created a form where calculate fields are used to create both a value used for a constraint and text to use in the constraint message. However, while the constraint itself seems to work correctly when I view the form on my tablet, the constraint message doesn't - instead of displaying my text from the calculate field, it displays e.g. "${0}". This same text works when I use it in a note instead. I've attached a sample form where this is reproduced.

Thanks,
Laura

constraintMessageError.xlsx

JavaRosa bug in progress

All 6 comments

It's on the Javarosa side I've created the issue there https://github.com/opendatakit/javarosa/issues/36

@lbramley Do you need to have constraint messages in multiple languages? The issue seems to be that localized constraint messages can't properly include dynamic text like the result of a calculate. I'm not totally sure whether that's intentional behavior or not and will need to keep exploring that. If you don't need translated constraint messages, this form should work: constraintMessageError.xlsx.

I'm going to close this issue since as @grzesiek2010 stated, it pertains to the JavaRosa library that Collect is built on top of. If you'd like to keep being notified on our progress, @lbramley, I invite you to use the subscribe button to the right of the issues at opendatakit/javarosa#36 and opendatakit/xforms-spec#125. Additionally, if we do end up adding support for what you were doing in the original form, we will notify you here. Thanks for reporting this!

Thanks Helene, sorry for the delayed reply. Unfortunately I did need constraint messages in multiple languages. I’ll subscribe to keep following - thanks!

On 18 May 2017, at 22:51, Hélène Martin notifications@github.com wrote:

I'm going to close this issue since as @grzesiek2010 https://github.com/grzesiek2010 stated, it pertains to the JavaRosa library that Collect is built on top of. If you'd like to keep being notified on our progress, @lbramley https://github.com/lbramley, I invite you to use the subscribe button to the right of the issues at opendatakit/javarosa#36 https://github.com/opendatakit/javarosa/issues/36 and opendatakit/xforms-spec#125 https://github.com/opendatakit/xforms-spec/issues/125. Additionally, if we do end up adding support for what you were doing in the original form, we will notify you here. Thanks for reporting this!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/opendatakit/collect/issues/874#issuecomment-302551848, or mute the thread https://github.com/notifications/unsubscribe-auth/AVSrHEc3Q7RHExPydXdl9rNdurmzm6r9ks5r7L12gaJpZM4M7MW0.

@lbramley A little late to the party here but as of Collect 1.13.x you can use references to other values in constraint message text. Hope you will find it helpful for future surveying!

Hi @lognaturel,

The issue seems to be closed but when i try it out in the ODKCollect v1.27.1 i don't see it working as it should. Did i get something wrong?

Have also attached the xlsform for testing:

Constraint Dynamic Error Message.xlsx

Was this page helpful?
0 / 5 - 0 ratings