Warning: You are referencing a node in this form. This can cause errors in the form

We use a visit form to collect key data when visiting retailers.

The same visit form is also used to collect any key missing properties from
the retailer’s case that were not entered when the retailer was added to
the system.

The visit form loads the values of these key properties from the retailer
case and assigns them to hidden values eg the hidden value 'nearest_hc’
holds the name of the nearest health centre.

Then, at the end of the form a check is done to see if nearest_hc = ‘’ (ie
the hidden value is used as a display condition) and if it does (ie
nearest_hc is blank) the user is asked to enter this information and then
this information is saved back to the case when the form is submitted.

The issue is that this question and others like it have a red triangle
against them and the system states: “You are referencing a node in this
form. This can cause errors in the form”

This doesn’t prevent the application build.

What does this warning mean? Should I be worried? Is there another approach
I should be using?

Thanks

Simon

Hi Simon,

This error occurs when you use the ‘Default Value’ field in a question.

Default Value questions are calculated when the form is first loaded and
are not recalculated at any point during the form. Calculate Conditions are
recalculated after every change to the form.

Including a reference from a form question in the default value, means that
if that question’s value changes during the form entry, that change will
not be reflected in the question that uses the Default Value. This could be
intended behavior so it will not prevent the build. If you want to have the
value recalculated after entry to a question, then you should use
’Calculate Condition’ instead.

Thanks
Jon

··· On Thu, Sep 8, 2016 at 5:22 AM Simon Berry wrote:

We use a visit form to collect key data when visiting retailers.

The same visit form is also used to collect any key missing properties
from the retailer’s case that were not entered when the retailer was added
to the system.

The visit form loads the values of these key properties from the retailer
case and assigns them to hidden values eg the hidden value 'nearest_hc’
holds the name of the nearest health centre.

Then, at the end of the form a check is done to see if nearest_hc = ‘’ (ie
the hidden value is used as a display condition) and if it does (ie
nearest_hc is blank) the user is asked to enter this information and then
this information is saved back to the case when the form is submitted.

The issue is that this question and others like it have a red triangle
against them and the system states: “You are referencing a node in this
form. This can cause errors in the form”

This doesn’t prevent the application build.

What does this warning mean? Should I be worried? Is there another
approach I should be using?

Thanks

Simon


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

One other important consideration is that the Default Values for questions
in the form are loaded before any calculations occur, and happen in a
specific order. This means that if you have

hidden_value_one [ calculate = “10 + 50”]
numeric_input[ default_value = “#form/hidden_value_one”]

Numeric input’s default value will be “”, not “60”, since the default
values load first.

Similarly, the default value will be surprising in this situation:

numeric_input[ default_value = “#form/hidden_value_one”]
hidden_value_one [ default_value = “10 + 50”]

which will also result in numeric_input’s default value being “”, since the
default values load in the order in which they appear.

As a result, although it is possible to use a default value which
references another question in the form, there are a lot of ways for it to
result in outcomes that are confusing, so it’s generally best to avoid if
possible.

-Clayton

··· On Thu, Sep 8, 2016 at 10:38 AM, Jon Emord wrote:

Hi Simon,

This error occurs when you use the ‘Default Value’ field in a question.

Default Value questions are calculated when the form is first loaded and
are not recalculated at any point during the form. Calculate Conditions are
recalculated after every change to the form.

Including a reference from a form question in the default value, means
that if that question’s value changes during the form entry, that change
will not be reflected in the question that uses the Default Value. This
could be intended behavior so it will not prevent the build. If you want to
have the value recalculated after entry to a question, then you should use
’Calculate Condition’ instead.

Thanks
Jon

On Thu, Sep 8, 2016 at 5:22 AM Simon Berry simon@colalife.org wrote:

We use a visit form to collect key data when visiting retailers.

The same visit form is also used to collect any key missing properties
from the retailer’s case that were not entered when the retailer was added
to the system.

The visit form loads the values of these key properties from the retailer
case and assigns them to hidden values eg the hidden value 'nearest_hc’
holds the name of the nearest health centre.

Then, at the end of the form a check is done to see if nearest_hc = ‘’
(ie the hidden value is used as a display condition) and if it does (ie
nearest_hc is blank) the user is asked to enter this information and then
this information is saved back to the case when the form is submitted.

The issue is that this question and others like it have a red triangle
against them and the system states: “You are referencing a node in this
form. This can cause errors in the form”

This doesn’t prevent the application build.

What does this warning mean? Should I be worried? Is there another
approach I should be using?

Thanks

Simon


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi all,

I think I get whats you explained here.
Then is there a way to enter a default value to, lets say, a multiple
choice question based a some previous calculations ?

For exemple : we have a yes/no question that should be no under if previous
question is yes and age is greater than 18.

Thanks !

··· Le jeudi 8 septembre 2016 16:57:30 UTC+2, Clayton Sims a écrit : > > One other important consideration is that the Default Values for questions > in the form are loaded *before* any calculations occur, and happen in a > specific order. This means that if you have > > hidden_value_one [ calculate = "10 + 50"] > numeric_input[ default_value = "#form/hidden_value_one"] > > Numeric input's default value will be "", not "60", since the default > values load first. > > Similarly, the default value will be surprising in this situation: > > numeric_input[ default_value = "#form/hidden_value_one"] > hidden_value_one [ default_value = "10 + 50"] > > which will also result in numeric_input's default value being "", since > the default values load in the order in which they appear. > > As a result, although it is possible to use a default value which > references another question in the form, there are a lot of ways for it to > result in outcomes that are confusing, so it's generally best to avoid if > possible. > > -Clayton > > On Thu, Sep 8, 2016 at 10:38 AM, Jon Emord <jem...@dimagi.com > wrote: > >> Hi Simon, >> >> This error occurs when you use the 'Default Value' field in a question. >> >> Default Value questions are calculated when the form is first loaded and >> are not recalculated at any point during the form. Calculate Conditions are >> recalculated after every change to the form. >> >> Including a reference from a form question in the default value, means >> that if that question's value changes during the form entry, that change >> will not be reflected in the question that uses the Default Value. This >> could be intended behavior so it will not prevent the build. If you want to >> have the value recalculated after entry to a question, then you should use >> 'Calculate Condition' instead. >> >> Thanks >> Jon >> >> On Thu, Sep 8, 2016 at 5:22 AM Simon Berry <si...@colalife.org > wrote: >> >>> We use a visit form to collect key data when visiting retailers. >>> >>> The same visit form is also used to collect any key missing properties >>> from the retailer's case that were not entered when the retailer was added >>> to the system. >>> >>> The visit form loads the values of these key properties from the >>> retailer case and assigns them to hidden values eg the hidden value >>> 'nearest_hc' holds the name of the nearest health centre. >>> >>> Then, at the end of the form a check is done to see if nearest_hc = '' >>> (ie the hidden value is used as a display condition) and if it does (ie >>> nearest_hc is blank) the user is asked to enter this information and then >>> this information is saved back to the case when the form is submitted. >>> >>> The issue is that this question and others like it have a red triangle >>> against them and the system states: "You are referencing a node in this >>> form. This can cause errors in the form" >>> >>> This doesn't prevent the application build. >>> >>> What does this warning mean? Should I be worried? Is there another >>> approach I should be using? >>> >>> Thanks >>> >>> Simon >>> >>> -- >>> 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 . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> 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 . >> For more options, visit https://groups.google.com/d/optout. >> > >

Michel,

Unfortunately CommCare doesn’t support that particular design pattern well
at this time.

The nature of the declarative logic makes such a feature complex to design,
since it’s not clear, for instance, how/whether answers to previous
questions should end up “re-defaulting” the select question, or whether
after user intervention it should retain its current state, etc.

I shared a design pattern a moment ago regarding “Timestamping” which can
be extended to implement something similar in a pinch if instead of a an
invisible interior, you add the questions that you want to depend on
previous inputs.

This design essentially “gates” the creation of a portion of the form until
after some trigger is met, at which point the “Default value” set will be
introduced.

Note that once the “Gated” portion of the form is created, though, it is
a permanent part of the form, and the “default” values won’t ever be
triggered again.

-Clayton

··· On Thu, Apr 6, 2017 at 8:44 AM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Hi all,

I think I get whats you explained here.
Then is there a way to enter a default value to, lets say, a multiple
choice question based a some previous calculations ?

For exemple : we have a yes/no question that should be no under if
previous question is yes and age is greater than 18.

Thanks !

Le jeudi 8 septembre 2016 16:57:30 UTC+2, Clayton Sims a écrit :

One other important consideration is that the Default Values for
questions in the form are loaded before any calculations occur, and
happen in a specific order. This means that if you have

hidden_value_one [ calculate = “10 + 50”]
numeric_input[ default_value = “#form/hidden_value_one”]

Numeric input’s default value will be “”, not “60”, since the default
values load first.

Similarly, the default value will be surprising in this situation:

numeric_input[ default_value = “#form/hidden_value_one”]
hidden_value_one [ default_value = “10 + 50”]

which will also result in numeric_input’s default value being “”, since
the default values load in the order in which they appear.

As a result, although it is possible to use a default value which
references another question in the form, there are a lot of ways for it to
result in outcomes that are confusing, so it’s generally best to avoid if
possible.

-Clayton

On Thu, Sep 8, 2016 at 10:38 AM, Jon Emord jem...@dimagi.com wrote:

Hi Simon,

This error occurs when you use the ‘Default Value’ field in a question.

Default Value questions are calculated when the form is first loaded and
are not recalculated at any point during the form. Calculate Conditions are
recalculated after every change to the form.

Including a reference from a form question in the default value, means
that if that question’s value changes during the form entry, that change
will not be reflected in the question that uses the Default Value. This
could be intended behavior so it will not prevent the build. If you want to
have the value recalculated after entry to a question, then you should use
’Calculate Condition’ instead.

Thanks
Jon

On Thu, Sep 8, 2016 at 5:22 AM Simon Berry si...@colalife.org wrote:

We use a visit form to collect key data when visiting retailers.

The same visit form is also used to collect any key missing properties
from the retailer’s case that were not entered when the retailer was added
to the system.

The visit form loads the values of these key properties from the
retailer case and assigns them to hidden values eg the hidden value
’nearest_hc’ holds the name of the nearest health centre.

Then, at the end of the form a check is done to see if nearest_hc = ‘’
(ie the hidden value is used as a display condition) and if it does (ie
nearest_hc is blank) the user is asked to enter this information and then
this information is saved back to the case when the form is submitted.

The issue is that this question and others like it have a red triangle
against them and the system states: “You are referencing a node in this
form. This can cause errors in the form”

This doesn’t prevent the application build.

What does this warning mean? Should I be worried? Is there another
approach I should be using?

Thanks

Simon


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ok thanks for your answer.
I will try your gates for curiosity, but I think the best will be to find
alternative workflow if possible…

Michel

··· 2017-04-06 20:08 GMT+02:00 Clayton Sims :

Michel,

Unfortunately CommCare doesn’t support that particular design pattern well
at this time.

The nature of the declarative logic makes such a feature complex to
design, since it’s not clear, for instance, how/whether answers to previous
questions should end up “re-defaulting” the select question, or whether
after user intervention it should retain its current state, etc.

I shared a design pattern a moment ago regarding “Timestamping” which can
be extended to implement something similar in a pinch if instead of a an
invisible interior, you add the questions that you want to depend on
previous inputs.

This design essentially “gates” the creation of a portion of the form
until after some trigger is met, at which point the “Default value” set
will be introduced.

Note that once the “Gated” portion of the form is created, though, it
is a permanent part of the form, and the “default” values won’t ever be
triggered again.

-Clayton

On Thu, Apr 6, 2017 at 8:44 AM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Hi all,

I think I get whats you explained here.
Then is there a way to enter a default value to, lets say, a multiple
choice question based a some previous calculations ?

For exemple : we have a yes/no question that should be no under if
previous question is yes and age is greater than 18.

Thanks !

Le jeudi 8 septembre 2016 16:57:30 UTC+2, Clayton Sims a écrit :

One other important consideration is that the Default Values for
questions in the form are loaded before any calculations occur, and
happen in a specific order. This means that if you have

hidden_value_one [ calculate = “10 + 50”]
numeric_input[ default_value = “#form/hidden_value_one”]

Numeric input’s default value will be “”, not “60”, since the default
values load first.

Similarly, the default value will be surprising in this situation:

numeric_input[ default_value = “#form/hidden_value_one”]
hidden_value_one [ default_value = “10 + 50”]

which will also result in numeric_input’s default value being “”, since
the default values load in the order in which they appear.

As a result, although it is possible to use a default value which
references another question in the form, there are a lot of ways for it to
result in outcomes that are confusing, so it’s generally best to avoid if
possible.

-Clayton

On Thu, Sep 8, 2016 at 10:38 AM, Jon Emord jem...@dimagi.com wrote:

Hi Simon,

This error occurs when you use the ‘Default Value’ field in a question.

Default Value questions are calculated when the form is first loaded
and are not recalculated at any point during the form. Calculate Conditions
are recalculated after every change to the form.

Including a reference from a form question in the default value, means
that if that question’s value changes during the form entry, that change
will not be reflected in the question that uses the Default Value. This
could be intended behavior so it will not prevent the build. If you want to
have the value recalculated after entry to a question, then you should use
’Calculate Condition’ instead.

Thanks
Jon

On Thu, Sep 8, 2016 at 5:22 AM Simon Berry si...@colalife.org wrote:

We use a visit form to collect key data when visiting retailers.

The same visit form is also used to collect any key missing properties
from the retailer’s case that were not entered when the retailer was added
to the system.

The visit form loads the values of these key properties from the
retailer case and assigns them to hidden values eg the hidden value
’nearest_hc’ holds the name of the nearest health centre.

Then, at the end of the form a check is done to see if nearest_hc = ‘’
(ie the hidden value is used as a display condition) and if it does (ie
nearest_hc is blank) the user is asked to enter this information and then
this information is saved back to the case when the form is submitted.

The issue is that this question and others like it have a red triangle
against them and the system states: “You are referencing a node in this
form. This can cause errors in the form”

This doesn’t prevent the application build.

What does this warning mean? Should I be worried? Is there another
approach I should be using?

Thanks

Simon


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/aKkD2Hr97Dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Michel,

One other pattern to consider is calculating the default value in a hidden
value and then display that value to the user in a label and ask if they’d
like to change it. For a yes/no question, that may not be worth it, but
for select lists with a lot of options or date values especially, it makes
the user flow easier. Especially if you think they’d frequently be
selecting the default value anyway.

i.e. “We calculated the next follow-up date is June 5. Would you like to
change this date?” or “The default district is Bangalore. Would you like
to choose a different one?”

-Nick

Nick Nestle
Technical Project Manager | Dimagi Inc.

··· On Mon, Apr 10, 2017 at 1:06 AM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Ok thanks for your answer.
I will try your gates for curiosity, but I think the best will be to find
alternative workflow if possible…

Michel

2017-04-06 20:08 GMT+02:00 Clayton Sims csims@dimagi.com:

Michel,

Unfortunately CommCare doesn’t support that particular design pattern
well at this time.

The nature of the declarative logic makes such a feature complex to
design, since it’s not clear, for instance, how/whether answers to previous
questions should end up “re-defaulting” the select question, or whether
after user intervention it should retain its current state, etc.

I shared a design pattern a moment ago regarding “Timestamping” which can
be extended to implement something similar in a pinch if instead of a an
invisible interior, you add the questions that you want to depend on
previous inputs.

This design essentially “gates” the creation of a portion of the form
until after some trigger is met, at which point the “Default value” set
will be introduced.

Note that once the “Gated” portion of the form is created, though, it
is a permanent part of the form, and the “default” values won’t ever be
triggered again.

-Clayton

On Thu, Apr 6, 2017 at 8:44 AM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Hi all,

I think I get whats you explained here.
Then is there a way to enter a default value to, lets say, a multiple
choice question based a some previous calculations ?

For exemple : we have a yes/no question that should be no under if
previous question is yes and age is greater than 18.

Thanks !

Le jeudi 8 septembre 2016 16:57:30 UTC+2, Clayton Sims a écrit :

One other important consideration is that the Default Values for
questions in the form are loaded before any calculations occur, and
happen in a specific order. This means that if you have

hidden_value_one [ calculate = “10 + 50”]
numeric_input[ default_value = “#form/hidden_value_one”]

Numeric input’s default value will be “”, not “60”, since the default
values load first.

Similarly, the default value will be surprising in this situation:

numeric_input[ default_value = “#form/hidden_value_one”]
hidden_value_one [ default_value = “10 + 50”]

which will also result in numeric_input’s default value being “”, since
the default values load in the order in which they appear.

As a result, although it is possible to use a default value which
references another question in the form, there are a lot of ways for it to
result in outcomes that are confusing, so it’s generally best to avoid if
possible.

-Clayton

On Thu, Sep 8, 2016 at 10:38 AM, Jon Emord jem...@dimagi.com wrote:

Hi Simon,

This error occurs when you use the ‘Default Value’ field in a
question.

Default Value questions are calculated when the form is first loaded
and are not recalculated at any point during the form. Calculate Conditions
are recalculated after every change to the form.

Including a reference from a form question in the default value, means
that if that question’s value changes during the form entry, that change
will not be reflected in the question that uses the Default Value. This
could be intended behavior so it will not prevent the build. If you want to
have the value recalculated after entry to a question, then you should use
’Calculate Condition’ instead.

Thanks
Jon

On Thu, Sep 8, 2016 at 5:22 AM Simon Berry si...@colalife.org wrote:

We use a visit form to collect key data when visiting retailers.

The same visit form is also used to collect any key missing
properties from the retailer’s case that were not entered when the retailer
was added to the system.

The visit form loads the values of these key properties from the
retailer case and assigns them to hidden values eg the hidden value
’nearest_hc’ holds the name of the nearest health centre.

Then, at the end of the form a check is done to see if nearest_hc =
’’ (ie the hidden value is used as a display condition) and if it does (ie
nearest_hc is blank) the user is asked to enter this information and then
this information is saved back to the case when the form is submitted.

The issue is that this question and others like it have a red
triangle against them and the system states: “You are referencing a node in
this form. This can cause errors in the form”

This doesn’t prevent the application build.

What does this warning mean? Should I be worried? Is there another
approach I should be using?

Thanks

Simon


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/to
pic/commcare-users/aKkD2Hr97Dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks Nick for the note.

You’ve got a good point, but as you mentioned, no value added in case of
yes/no questions.
My use case is along list of yes/no questions presented as a grid, and some
of those questions can be answered based on previous questions. We want to
let the user check the answer and change the answers if needed.

Michel

··· 2017-04-10 17:27 GMT+02:00 Nick Nestle :

Hi Michel,

One other pattern to consider is calculating the default value in a hidden
value and then display that value to the user in a label and ask if they’d
like to change it. For a yes/no question, that may not be worth it, but
for select lists with a lot of options or date values especially, it makes
the user flow easier. Especially if you think they’d frequently be
selecting the default value anyway.

i.e. “We calculated the next follow-up date is June 5. Would you like to
change this date?” or “The default district is Bangalore. Would you like
to choose a different one?”

-Nick

Nick Nestle
Technical Project Manager | Dimagi Inc.

On Mon, Apr 10, 2017 at 1:06 AM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Ok thanks for your answer.
I will try your gates for curiosity, but I think the best will be to find
alternative workflow if possible…

Michel

2017-04-06 20:08 GMT+02:00 Clayton Sims csims@dimagi.com:

Michel,

Unfortunately CommCare doesn’t support that particular design pattern
well at this time.

The nature of the declarative logic makes such a feature complex to
design, since it’s not clear, for instance, how/whether answers to previous
questions should end up “re-defaulting” the select question, or whether
after user intervention it should retain its current state, etc.

I shared a design pattern a moment ago regarding “Timestamping” which
can be extended to implement something similar in a pinch if instead of a
an invisible interior, you add the questions that you want to depend on
previous inputs.

This design essentially “gates” the creation of a portion of the form
until after some trigger is met, at which point the “Default value” set
will be introduced.

Note that once the “Gated” portion of the form is created, though, it
is a permanent part of the form, and the “default” values won’t ever be
triggered again.

-Clayton

On Thu, Apr 6, 2017 at 8:44 AM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Hi all,

I think I get whats you explained here.
Then is there a way to enter a default value to, lets say, a multiple
choice question based a some previous calculations ?

For exemple : we have a yes/no question that should be no under if
previous question is yes and age is greater than 18.

Thanks !

Le jeudi 8 septembre 2016 16:57:30 UTC+2, Clayton Sims a écrit :

One other important consideration is that the Default Values for
questions in the form are loaded before any calculations occur, and
happen in a specific order. This means that if you have

hidden_value_one [ calculate = “10 + 50”]
numeric_input[ default_value = “#form/hidden_value_one”]

Numeric input’s default value will be “”, not “60”, since the default
values load first.

Similarly, the default value will be surprising in this situation:

numeric_input[ default_value = “#form/hidden_value_one”]
hidden_value_one [ default_value = “10 + 50”]

which will also result in numeric_input’s default value being “”,
since the default values load in the order in which they appear.

As a result, although it is possible to use a default value which
references another question in the form, there are a lot of ways for it to
result in outcomes that are confusing, so it’s generally best to avoid if
possible.

-Clayton

On Thu, Sep 8, 2016 at 10:38 AM, Jon Emord jem...@dimagi.com wrote:

Hi Simon,

This error occurs when you use the ‘Default Value’ field in a
question.

Default Value questions are calculated when the form is first loaded
and are not recalculated at any point during the form. Calculate Conditions
are recalculated after every change to the form.

Including a reference from a form question in the default value,
means that if that question’s value changes during the form entry, that
change will not be reflected in the question that uses the Default Value.
This could be intended behavior so it will not prevent the build. If you
want to have the value recalculated after entry to a question, then you
should use ‘Calculate Condition’ instead.

Thanks
Jon

On Thu, Sep 8, 2016 at 5:22 AM Simon Berry si...@colalife.org wrote:

We use a visit form to collect key data when visiting retailers.

The same visit form is also used to collect any key missing
properties from the retailer’s case that were not entered when the retailer
was added to the system.

The visit form loads the values of these key properties from the
retailer case and assigns them to hidden values eg the hidden value
’nearest_hc’ holds the name of the nearest health centre.

Then, at the end of the form a check is done to see if nearest_hc =
’’ (ie the hidden value is used as a display condition) and if it does (ie
nearest_hc is blank) the user is asked to enter this information and then
this information is saved back to the case when the form is submitted.

The issue is that this question and others like it have a red
triangle against them and the system states: “You are referencing a node in
this form. This can cause errors in the form”

This doesn’t prevent the application build.

What does this warning mean? Should I be worried? Is there another
approach I should be using?

Thanks

Simon


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/to
pic/commcare-users/aKkD2Hr97Dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/aKkD2Hr97Dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.