Hello All.
We are working on a survey that has a select multiple question and we have set the total number of allowed selections to <= 3 using the count-selected() function in the constraint field. For each of the answers in this select multiple question we have an affiliated geopoint question (using repeats) using the relevant field in each of the repeats and the selected() function from the previous select multiple question. Unfortunately, since our constraint of selecting no more than 3 answers from the select multiple question is only checked when someone is trying to submit the survey it would be possible for them to interact with all the maps that are affiliated with each of the answers (~10).
For example, if we only have four answers to the select multiple and someone selects all of them, they will be able to interact with all four of the affiliated maps. We only want them to see the maps that are affiliated with three or fewer answers to the question, is this possible to do?
Thanks, and have a great rest of your weekend and/or beginning of your week.
@GarrettRSmith what platform is the end user filling out the form in. The field app applies the constraints on submit, but the web form applies them immediately.
One option would be to add a "warning" using a relevant field if the select over 3 choices, that could be immediate, but it wouldn't stop them from seeing the other choices until submit.
Here is a work around if you the warning doesn't suffice. The general idea, is you write out the choices in a note, and then have a text question with an input mask that limits them to 3 choices. You then have the same relevancies on the map questions. Its a bit klunky but it appears to work.
@Neal_t_k they will be filling out the form online, not using the field app. That is good to know, I guess when I am testing it in Connect it lets me select as many options as I want. I will also look at your suggestion below. Thanks.
@GarrettRSmith You will probably want to test the constraint on the web app, It may just show the warning right away, but a user may still be able to see check more options and see all the maps?
@Neal_t_k thanks, I will try it out.
Also, and this might be a simple question, do you know if it is possible to set up a "note" question (though it not really a question) that is based on a relevant condition if someone selects more than three choices?
I tried putting the following in the relevant field of the note row:
count-selected(${question_name_here}) > 3
And it is not working.
Thanks again.
That should work...
@GarrettRSmith Not sure why I didn't think of this before, it is along the same lines as the example I provided earlier but a cleaner interface could just be to have 3 select one questions. And then in your relevant field for your repeats you would just have some 'or's:
selected(${Q1}, 'anws1') or selected(${Q2}, 'anws1') or selected(${Q3}, 'anws1')
selected(${Q1}, 'anws2') or selected(${Q2}, 'anws2') or selected(${Q3}, 'anws2')
etc
emoji's are an option as well that I think works in the web