I've been building a survey that has several pages. Each page has a repeat containing one geopoint question. I've constrained the map question so that the submitter has to place 3 separate points before they can proceed to the next survey page. It's all working as it should except for on the mobile app. There, when I place my first point I get this error: "jr:itext('/form/page_2/point1/location:jr:constraintMsg". "page_2" is the name of the group/page and "point1" is the name of the repeat.
On a web browser (desktop or mobile), no problem:
On the Survey123 mobile app, I get this error:
Is there anything that can be done about this? I don't know the cause or how I might fix it.
Solved! Go to Solution.
A couple things I am noticing.
1. Your constraint is "${numPoints1}=3" which is appropriately triggering on the first repeat because 1 = 3 is false. Try "${numPoints1}<=3" This won't trigger till you get to repeat 4.
2. Not sure why the constraint msg isn't displaying properly in the geopoint question, but you could try making a relevant field to trigger on repeat 4 to display your message and then constrain that field. The constraint msg should show then.
3 This might be a good place to implement the "repeat_count" column. If you put 3 for repeat_count, the form will start with 3 repeats. And since you are requiring the user to place 3 points, you may not need the constraints then.
4. Take a look at you field names, I see "location" several times. You probably want to give them unique names as it may cause issues down the road.
A couple things I am noticing.
1. Your constraint is "${numPoints1}=3" which is appropriately triggering on the first repeat because 1 = 3 is false. Try "${numPoints1}<=3" This won't trigger till you get to repeat 4.
2. Not sure why the constraint msg isn't displaying properly in the geopoint question, but you could try making a relevant field to trigger on repeat 4 to display your message and then constrain that field. The constraint msg should show then.
3 This might be a good place to implement the "repeat_count" column. If you put 3 for repeat_count, the form will start with 3 repeats. And since you are requiring the user to place 3 points, you may not need the constraints then.
4. Take a look at you field names, I see "location" several times. You probably want to give them unique names as it may cause issues down the road.
I really appreciate the help and tips. I'm very new to repeats and learned some good tricks here. Didn't know <= was accepted and have never touched the repeat column before! Those two helped me get something a lot closer to my initial goal for the survey. And modifying those fixed whatever was unhappy about the constraint message, so double win. Thanks again!