Calculated constrain.

11 views
Skip to first unread message

gap1981

unread,
Apr 17, 2012, 5:47:42 PM4/17/12
to xls2...@googlegroups.com
So i have a doubt about making somekind of dinamic or calculated constrain. I will put and example to make myself clear.
1. How many bicycles do you have at home?  Constraint: none    Answer: 5 
2. Of this bicycles how much of them are for kids? Constraint: 5 o less  Answer: 3
3. And how many are for adults?   Constraint: answer1-answer2   Answer:2

I hope i make myself clear. 
Thanks

Prabhas Pokharel

unread,
Apr 17, 2012, 6:07:01 PM4/17/12
to xls2...@googlegroups.com
hi,
you can use something like:

name                    constraint
bicycles
bicycle_kids          . <= ${bicycles}
bicycle_adults       . <= ${bicycles} - ${bicycle_kids}

with the appropriate type/label/etc. in each of the fields.
. refers to the current question.


Hope that helps!
--p 
--
Prabhas Pokharel
http://twitter.com/prabhasp
Nepal mobile: +977 98137 91044
US mobile: +1 347 948 7654
skype/facebook/whatever: prabhasp

Prabhas Pokharel

unread,
Apr 17, 2012, 6:14:17 PM4/17/12
to xls2...@googlegroups.com
I have also put this example in the http://formhub.org/syntax/ page. Note the constraint_message column is optional, but I have added it for illustration.

Guillermo Perazzo

unread,
Apr 17, 2012, 10:27:29 PM4/17/12
to xls2...@googlegroups.com
thanks it worked excelent!
Guillermo A. Perazzo





2012/4/17 Prabhas Pokharel <prabhas....@gmail.com>
Reply all
Reply to author
Forward
0 new messages