Make a constraint

I need your help to program a constraint.
I have three items (water, electricity, road) to be classify by priority:
First priority, second priority, third priority. It is not possible to have
the same priority for two differents items. How can I program this?
Specificaly, I want to display an error message if there are two or more
items which have the same priority.

Thank you

Please, se in attach the form for more precision on my question.

question.xlsx (9.01 KB)

··· Le jeudi 27 mars 2014 14:26:45 UTC, tomci a écrit : > > > I need your help to program a constraint. > I have three items (water, electricity, road) to be classify by priority: > First priority, second priority, third priority. It is not possible to have > the same priority for two differents items. How can I program this? > Specificaly, I want to display an error message if there are two or more > items which have the same priority. > > Thank you >

Dear Weijia,
Thank you for your answer. I try to do it with cascading but it dont work
as I want. Here is how my form is presented:

survey

type name label select_one priority water What is water priority for you? select_one
priority electricity What is electricity priority for you? select_one
priority road What is road priority for you?
choices

list_name name label  ordre_difficultes 1 First priority  

ordre_difficultes 2 Second priority
ordre_difficultes 3 Third priority

I want to program a constraint which hinder to have the same level of
priority for two differents questions. For example if we have this kind of
answers:

Questions Answers
What is water priority for you?: First priority
What is electricity priority for you?: First priority
What is road priority for you?: First priority

then the program display an error message and didn't allow to continue
until this is rectified.
How can I do this?

··· Le jeudi 27 mars 2014 14:26:45 UTC, tomci a écrit : > > > I need your help to program a constraint. > I have three items (water, electricity, road) to be classify by priority: > First priority, second priority, third priority. It is not possible to have > the same priority for two differents items. How can I program this? > Specificaly, I want to display an error message if there are two or more > items which have the same priority. > > Thank you >

This is what I'd do. Have selects that ask for priorities like you
do now. Put all those one page (put in group with field-list
appearance).

Then outside that group, have a note prompt that is only relevant if
water/electricity/road are the same. You have to put this outside the
group or the logic won't work.

Make sure that the note also has a constraint for the user not to
continue if they are the same. Make that constraint_message something
like "Electricity, water, road cannot be the same priority, swipe back
to correct."

If you are new to XLSForm,
http://opendatakit.org/help/form-design/xlsform will help.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Thu, Mar 27, 2014 at 11:32 AM, tomci crda.burkina@gmail.com wrote:

Dear Weijia,
Thank you for your answer. I try to do it with cascading but it dont work as I want. Here is how my form is presented:

survey

type name label
select_one priority water What is water priority for you?
select_one priority electricity What is electricity priority for you?
select_one priority road What is road priority for you?

choices

list_name name label
ordre_difficultes 1 First priority
ordre_difficultes 2 Second priority
ordre_difficultes 3 Third priority

I want to program a constraint which hinder to have the same level of priority for two differents questions. For example if we have this kind of answers:

Questions Answers
What is water priority for you?: First priority
What is electricity priority for you?: First priority
What is road priority for you?: First priority

then the program display an error message and didn't allow to continue until this is rectified.
How can I do this?

Le jeudi 27 mars 2014 14:26:45 UTC, tomci a écrit :

I need your help to program a constraint.
I have three items (water, electricity, road) to be classify by priority: First priority, second priority, third priority. It is not possible to have the same priority for two differents items. How can I program this? Specificaly, I want to display an error message if there are two or more items which have the same priority.

Thank you

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Tomic,

I thought you can try

··· On 27 March 2014 14:55, tomci wrote:

Please, se in attach the form for more precision on my question.

Le jeudi 27 mars 2014 14:26:45 UTC, tomci a écrit :

I need your help to program a constraint.
I have three items (water, electricity, road) to be classify by priority:
First priority, second priority, third priority. It is not possible to have
the same priority for two differents items. How can I program this?
Specificaly, I want to display an error message if there are two or more
items which have the same priority.

Thank you

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Tomic,

Personally, I thought you can try 'cascading selects'

http://opendatakit.org/help/form-design/cascading-selects/

Weijia

··· On 27 March 2014 14:55, tomci wrote:

Please, se in attach the form for more precision on my question.

Le jeudi 27 mars 2014 14:26:45 UTC, tomci a écrit :

I need your help to program a constraint.
I have three items (water, electricity, road) to be classify by priority:
First priority, second priority, third priority. It is not possible to have
the same priority for two differents items. How can I program this?
Specificaly, I want to display an error message if there are two or more
items which have the same priority.

Thank you

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Yaw,
Thank you very much for your suggestion. I have tried it but it doesn't
work. Have you tried? Is it possible for you to do it on the Excel form put
in attached?
Thank you very much for your help.

question.xlsx (9.13 KB)

··· Le jeudi 27 mars 2014 18:50:47 UTC, Yaw Anokwa a écrit : > > This is what I'd do. Have selects that ask for priorities like you > do now. Put all those one page (put in group with field-list > appearance). > > Then outside that group, have a note prompt that is only relevant if > water/electricity/road are the same. You have to put this outside the > group or the logic won't work. > > Make sure that the note also has a constraint for the user not to > continue if they are the same. Make that constraint_message something > like "Electricity, water, road cannot be the same priority, swipe back > to correct." > > If you are new to XLSForm, > http://opendatakit.org/help/form-design/xlsform will help. > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > > On Thu, Mar 27, 2014 at 11:32 AM, tomci <crda.b...@gmail.com > wrote: > > > > Dear Weijia, > > Thank you for your answer. I try to do it with cascading but it dont > work as I want. Here is how my form is presented: > > > > survey > > > > type name label > > select_one priority water What is water priority for you? > > select_one priority electricity What is electricity priority for you? > > select_one priority road What is road priority for you? > > > > choices > > > > list_name name label > > ordre_difficultes 1 First priority > > ordre_difficultes 2 Second priority > > ordre_difficultes 3 Third priority > > > > > > > > > > > > > > > > > > > > > > > > > > I want to program a constraint which hinder to have the same level of > priority for two differents questions. For example if we have this kind of > answers: > > > > Questions Answers > > What is water priority for you?: First priority > > What is electricity priority for you?: First priority > > What is road priority for you?: First priority > > > > then the program display an error message and didn't allow to continue > until this is rectified. > > How can I do this? > > > > > > > > Le jeudi 27 mars 2014 14:26:45 UTC, tomci a écrit : > >> > >> > >> I need your help to program a constraint. > >> I have three items (water, electricity, road) to be classify by > priority: First priority, second priority, third priority. It is not > possible to have the same priority for two differents items. How can I > program this? Specificaly, I want to display an error message if there are > two or more items which have the same priority. > >> > >> Thank you > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google > Groups "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to opendatakit...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. >

I can't do it for you, but if you have specific questions about the
approach I outlined earlier, I'm glad to help with that.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Mar 28, 2014 at 1:43 AM, tomci crda.burkina@gmail.com wrote:

Hello Yaw,
Thank you very much for your suggestion. I have tried it but it doesn't
work. Have you tried? Is it possible for you to do it on the Excel form put
in attached?
Thank you very much for your help.

Le jeudi 27 mars 2014 18:50:47 UTC, Yaw Anokwa a écrit :

This is what I'd do. Have selects that ask for priorities like you
do now. Put all those one page (put in group with field-list
appearance).

Then outside that group, have a note prompt that is only relevant if
water/electricity/road are the same. You have to put this outside the
group or the logic won't work.

Make sure that the note also has a constraint for the user not to
continue if they are the same. Make that constraint_message something
like "Electricity, water, road cannot be the same priority, swipe back
to correct."

If you are new to XLSForm,
http://opendatakit.org/help/form-design/xlsform will help.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Thu, Mar 27, 2014 at 11:32 AM, tomci crda.b...@gmail.com wrote:

Dear Weijia,
Thank you for your answer. I try to do it with cascading but it dont
work as I want. Here is how my form is presented:

survey

type name label
select_one priority water What is water priority for you?
select_one priority electricity What is electricity priority for you?
select_one priority road What is road priority for you?

choices

list_name name label
ordre_difficultes 1 First priority
ordre_difficultes 2 Second priority
ordre_difficultes 3 Third priority

I want to program a constraint which hinder to have the same level of
priority for two differents questions. For example if we have this kind of
answers:

Questions Answers
What is water priority for you?: First priority
What is electricity priority for you?: First priority
What is road priority for you?: First priority

then the program display an error message and didn't allow to continue
until this is rectified.
How can I do this?

Le jeudi 27 mars 2014 14:26:45 UTC, tomci a écrit :

I need your help to program a constraint.
I have three items (water, electricity, road) to be classify by
priority: First priority, second priority, third priority. It is not
possible to have the same priority for two differents items. How can I
program this? Specificaly, I want to display an error message if there are
two or more items which have the same priority.

Thank you

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.