Logic - multiple children | Community
Skip to main content
Answered

Logic - multiple children


Forum|alt.badge.img

I’m creating a series of questions based on childcare and I need to ask about multiple children (if people have them).

My first question is how many children they have - I need data on each - and then there are various questions about the family circumstances and childcare provision in their area.

if someone says they have 3 children or 6 children or whatever I need the information for each child. But if someone says they have 1 child I want them to move on to the questions about their circumstances etc

How can I achieve this with logic?

Best answer by john.desborough

@Flexible Childcare - here are a few of the screenshots to help you think through the solutions: 

 

create question group for first child then duplicate the question group for the max number of registrations you want to have 

 

 

create a variable to hold the counter

put in your logic

on the last question in the question group you add logic like this:

and on the last of the question groups your logic would be like this: 

and that should help

i hope

des

View original

13 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5310 replies
  • October 21, 2022

@Flexible Childcare - yes  you can do this.. here is a sample form that i worked up to show a similar scenario … let me know if this is the type of thing you are seeking to build

essentially, it asks for the number to register, sets that number in a counter and then takes the user to the first ‘question group’ to enter the details. then it reduces the counter by one and if not zero goes to the next question group. etc. 

 


Forum|alt.badge.img

Hi @john.desborough this would be perfect….how do I do it? :)

 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5310 replies
  • Answer
  • October 21, 2022

@Flexible Childcare - here are a few of the screenshots to help you think through the solutions: 

 

create question group for first child then duplicate the question group for the max number of registrations you want to have 

 

 

create a variable to hold the counter

put in your logic

on the last question in the question group you add logic like this:

and on the last of the question groups your logic would be like this: 

and that should help

i hope

des


Forum|alt.badge.img

Wow, thank you!! I will need to have a try and see how I get on. Can I touch base again next week if necessary?


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5310 replies
  • October 21, 2022

@Flexible Childcare - the community is always here lol as am i.. too much it seems from time to time

 


Forum|alt.badge.img

Hi @john.desborough…...Thanks again for your pointers last week. I’ve tried to follow your logic but I cant get it to work in the same way as your example.

On screenshot 3, Branching & Calculations….do I need to add this logic to each ‘details of the child’ question?

 

 

 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5310 replies
  • October 25, 2022

@Flexible Childcare - no.. you only need to do it on the last question of the question group. ie if you have 4 questions in the group, put it on the last one… if you do it on each question, in a group then you will reduce the counter rapidly and not get the correct result

des


Forum|alt.badge.img

Sorry for yet more questions….I’ve almost got it cracked. I can get the logic to work effectively for all child numbers apart from the maximum, which in my case is 6.

When I test and say I have 6 children (god forbid!) I can only answer the details for 1 child before it takes me to question group 8 where I ask about the childcare.

On my last question group about the details of the children I’ve set the rule to:

Can you let me know my mistake please?


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5310 replies
  • October 26, 2022

@Flexible Childcare - can you take a screenshot of the logic rules for the first child please, and for the logic rule where you set the counter variable.. just to make sure… 

thanks

des


Forum|alt.badge.img

Thanks again @john.desborough 

 

 

The next two screenshots show how I’ve applied the logic to the end of each child question group.

I’ve applied this logic to each child question group apart from the last one. The logic I applied on that one is:

 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5310 replies
  • October 26, 2022

@Flexible Childcare - is the logic rule less than or equal to 6? or just less than

 


Forum|alt.badge.img

Hi @john.desborough I had it as less than but have now changed to to less than or equal to and it works.

A huge thank you!!!

I might be a coffee adict now but at least I’ll get some sleep tonight!

Really appreciate all of your help John, thank you!

 

Todd


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5310 replies
  • October 27, 2022

lol.. @Flexible Childcare /Todd - coffee addiction comes with the territory lol.. 

pay your success forward: next time you are at a coffee shop, ask if they provide ‘suspended coffees’ and if they do, buy one in addition to yours. Make someone who needs a coffee, but can’t afford it, smile!

 

cheers

 

des


Reply