Default values for a 'data entry session'

51 views
Skip to first unread message

Christian Neumann

unread,
Jun 16, 2016, 9:24:57 AM6/16/16
to commcare-users
Hi,

As part of our referral-tracking implementation I wonder what the best way to capture 'temporary default values' could be. When we have screening activities, they take place at one day and one particular location and often refer people to the next clinic day at one particular hospital. 

So the location of todays screening activity, the next clinic day (aka appointment day) and the nearest hospital can change, but usually not during the whole screening activity. Right now I have 3 questions for these data points on my form, but ideally I could preset them so that they come up as a default for the rest of the day. 

But I'm not sure how to do this. Maybe by simply using the answers from the previous case as a default for the the current one? Or by defining a general 'set default' form? Something else?

Thanks,
christian

Kishan Sampat

unread,
Jun 16, 2016, 9:39:16 AM6/16/16
to commcare-users
Hi Christian,

You can set default values by defining a default value under "Question Properties". Under this, there is the "Advanced Properties" which contains the 'Default Data Value' field. You can enter things in here like numbers (e.g. 0) and text (e.g. yes). Please see the following article for more information on how to achieve this: https://confluence.dimagi.com/display/commcarepublic/Defining+a+Default+Value

Regards,

Kishan

Christian Neumann

unread,
Jun 16, 2016, 9:56:19 AM6/16/16
to commcar...@googlegroups.com
Thanks a lot for you response Kushan!

I’ve seen this page, but wasn’t sure if this is what I want. The way I understand option #1 (also the one you are referring to) seems to have 'application default' values. If I want to change these defaults, I need to deploy a new version. But I only want the default for one day/session based on what the user defines upfront.

And I have to admit that I didn’t fully understand option #2 (case properties) as I couldn’t find them in my CommCare account. Can these properties change without deploying a new app?

Thanks,
christian

--
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/bwz0A-f3Wsc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Pride

unread,
Jun 16, 2016, 11:12:55 AM6/16/16
to commcare-users
Christian,

This sounds like a good use case for custom user data.

You could add these three fields (location, appointment, and nearest hospital) and then reference them from within the form.

Unfortunately, default values can only be literals at the moment, so you'll need to workaround this slightly. For example, you could display the 'default' value and then give users the ability to override this, with a separate hidden value calculation choosing the 'final' value between these two (overridden value if it exists, default otherwise).

If you have a standard plan or higher, User Case would also be a clean way around to do this. Then you could preload these values as case properties and proper default values, and also update them from within the calculation (IE if the user selects a nearer hospital the default would then be changed to that hospital).

Cheers,
Will

--
You received this message because you are subscribed to the Google Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commcare-user...@googlegroups.com.

Christian Neumann

unread,
Jun 20, 2016, 4:31:43 PM6/20/16
to commcare-users
Hi Will,

It seems indded that for this case the standard plan makes most sense.

But to clarify regarding the custom user data: Is this more or less hard-coding the values within the CommCare user accounts through the Manage Mobile Workers feature? Is there a way to change these values from a form or would someone always need to update the relevant user accounts prior to a new 'data entry session'?

Thanks a lot,
christian

William Pride

unread,
Jun 20, 2016, 4:33:50 PM6/20/16
to commcare-users

On Mon, Jun 20, 2016 at 4:31 PM, Christian Neumann <christia...@gmail.com> wrote:
But to clarify regarding the custom user data: Is this more or less hard-coding the values within the CommCare user accounts through the Manage Mobile Workers feature? Is there a way to change these values from a form or would someone always need to update the relevant user accounts prior to a new 'data entry session'?

That's correct. What you're describing in the latter sentence is User Case as linked above. 
Reply all
Reply to author
Forward
0 new messages