Hello,
I created a survey using Connect, but want to collect data using the browser.
The geopoint question requires the responder to drop on the point on the map, but when I click on the survey map in the browser, nothing happens. When I do the same operation on Survey123 app (android), it works fine.
Any idea how to fix this?
Thanks!
Solved! Go to Solution.
You could set bind::esri:fieldType = null for that question, if you don't need to capture it. Then you don't have to worry about it.
Can you share any more details or screen shots of the behavior? Can you still pan/zoom the map? Are there any calculations on the geopoint question?
Hello @Neal_t_k
The following are the settings on the geopoint:
Despite these settings, the map attempts to detect the location of the device.
Gives more error messages when it shouldn't.
Then when I try to click within the blue line to drop a point, this is what happens.
Thanks for your help.
It appears your constraint isn't setup quite right according to the following post: https://community.esri.com/t5/arcgis-survey123-questions/constraining-a-geopoint-answer-to-a-given-a...
getRecordAt pulls a json so you either need another helper to pull the attribute you wish to match or include it in your pulldata: pulldata("@layer", "getValueAt","attributes.YOURFIELDNAME", "https....", ${location})
Then you need to match it to something. So if I am understanding correctly, you should move the pulldata into a helper field. Create another helper field for your match, I am guessing it could be static. And then in your constraint, set the two helper fields equal to eachother
helperfield1 = "MatchingTermtoPolygon"
helperfield2 = pulldata("@layer", "getValueAt","attributes.YOURFIELDTHATMATCHES", "https....", ${location}) with location will be your geopoint question.
then in the constraint ${helperfield1}=${helperfield2}
Hope that makes sense.
Thanks @Neal_t_k. I did look through the posts that you shared before I started working on this solution.
I modified the getRecordAt expression because I was not trying to pull any value from the polygon layer, but only to use it as a kind of geofence. And, as I mentioned, it works in the Survey123 mobile app without any problem but fails to work in the browser version.
I will try to figure out how incorporate the original expression and make it work.
@dsinha So you just want to make sure that the capture is inside the blue line. what if you did something like this:
constraint: string-length(pulldata("@layer", "getValueAt","attributes.ANYFIELD", "https....", ${location}))>0
I changed it to getValueAt instead of getRecordAt, and you should be able to put any field that is not null. This should pull the content of a field and evaluate as greater than 0 if inside the polygon and should evaluate as 0 if outside the polygon.
@dsinha Did some further testing, the constraint in the geopoint question is causing your original issue, if you remove it, it should work, Then you will have to configure a constraint on a separate note field, it should act the same, not letting a user submit until the constraint is validated.
Edit: Added Example (Could use some fine tuning, but should be working) I used a watershed polygon feature for an the example. If in the US should work, outside of US should trigger the constraint. https://www.arcgis.com/home/item.html?id=5bbefdcd2511472ea9abd0afedb85c7e
Just wanted to add that I ran into a "Failed to submit error". Followed the suggestion here and set bind::esri:fieldLength to 50000 for the first pulldata field, and the error disappeared.