


Hello All,
I am wondering if someone of you knows how to limit the responses on a survey web app.
I want to create one that can store up to 100 responses no more, and then to redirect to the end activity.
Do have any idea how I can do that with a javascript or from any other activity?
Thanks a lot in advance.
Views
Replies
Sign in to like this content
Total Likes
There can be a custom solution to this. You can use a counter in JS to store the number of responses that have been received (After the survey page and before the end activity as depicted by Script 2 in the diagram below). You can store this count in a global variable (option) by using the setOption() method.
Now every time the survey is opened, you can add a JS validator (Script 1 in the above diagram ) that checks the current survey count from the option that you set earlier (using getOption() method). If it's less than 100, you can update a boolean variable and then use a test activity to validate the boolean and trigger the survey page or the End activity as per its value.
There can be a custom solution to this. You can use a counter in JS to store the number of responses that have been received (After the survey page and before the end activity as depicted by Script 2 in the diagram below). You can store this count in a global variable (option) by using the setOption() method.
Now every time the survey is opened, you can add a JS validator (Script 1 in the above diagram ) that checks the current survey count from the option that you set earlier (using getOption() method). If it's less than 100, you can update a boolean variable and then use a test activity to validate the boolean and trigger the survey page or the End activity as per its value.
Views
Replies
Sign in to like this content
Total Likes