Select to view content in your preferred language

Repeat based on answered integer question

1282
7
03-29-2023 11:51 AM
FavaN2021
Emerging Contributor

Hello, I am working on a complaint form and if the customer wants to complain on multiple employees, I want repeats to occur based on the integer answer. 

For example, 

Question: How many employees did you want to file a complaint on? 

Answer: 2

Based on the answer '2', I want two employee repeat questions to populate. At the moment, I have 6 employee questions. 

Wondering if this is possible, if not, I will just keep the questions as repeat. 

Tags (3)
0 Kudos
7 Replies
DougBrowning
MVP Esteemed Contributor

You can use the repeat_count column for this.

0 Kudos
FavaN2021
Emerging Contributor

@DougBrowning  Thank you! I have that down but how can I  make the repeat count dependent on the previously answered. So if they put '2' in the " how many employees did you want to complain on", how can I get '2' repeats to follow. 

0 Kudos
JenniferAcunto
Esri Regular Contributor

You would simply call that field in the repeat_count column. If your question that asks how many employees is called 'employees', you would add ${employees} to the repeat_count column. 

- Jen
FavaN2021
Emerging Contributor

Thank you for replying. Unfortunately, it is not producing the results I envision. Currently I have an integer question " How many employees are involved in this complaint?" followed by a few identifying text employees questions such as:

What is the name?

What is the id number?

Description?

If the end user responses with "2" in the question " How many employees are involved in this complaint" 

I want the three text questions to repeat TWICE because the user has selected 2 employees. I have added to the repeat count column as suggested and did not have any luck. 

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

Post the form or it is really hard to help my guessing.  

0 Kudos
FavaN2021
Emerging Contributor
 
0 Kudos
DougBrowning
MVP Esteemed Contributor

I see nothing in repeat_count column so I added it.  Also you need to move the int field outside the repeat so they can answer before it is created.  I would add a relevant to the repeat also to help the user.  See attached.  I did not test it but it should be close.