Select to view content in your preferred language

Error on map question, but on mobile app only

166
4
Jump to solution
3 weeks ago
Crinoid
Occasional Contributor

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:

noproblem.png

 

On the Survey123 mobile app, I get this error:

problem.png

Is there anything that can be done about this? I don't know the cause or how I might fix it.

0 Kudos
1 Solution

Accepted Solutions
Neal_t_k
Frequent Contributor

@Crinoid 

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.

View solution in original post

4 Replies
Neal_t_k
Frequent Contributor

Did you build this in Connect can you share the relevant parts of your xlsx?  From what you shared there appears to be an issue with your constraint msg.

Crinoid
Occasional Contributor

Here's a copy of the draft. The constraint message just reads "(Place exactly three points before proceeding to the next page.)"

0 Kudos
Neal_t_k
Frequent Contributor

@Crinoid 

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.

Crinoid
Occasional Contributor

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!