Hi All,
I have created a survey for our forestry department and keep getting this error when I test the survey. The Calculation that is giving me trouble is: concat(substr(${LAT},0,2),substr(${LAT}, 3,5),substr(${LONG},1,4),substr(${LONG},5)). PDD_ID is a unique identifier for the department and is how they identify the area or block they are surveying.
Typically the error arises when I added in the last Substr. In and of itself, the substring calculations work as do the concatenations. It seems as though the error is happening when they are combined.
What I have done:
I have lengthened all fields to an appropriate size in both Survey123 and ArcGIS Pro.
I have created fake fields and tried the same calculation, while also breaking down the calculation.
I have attached a copy of my XLSX. Is there a work around for this? It feel as though I have tried everything.
Thank You in Advance
Hi Erica
I suspect the issue is in the last substr() function - substr(${LONG}, 5). That would grab all of the characters from position 5 onward. Given teh rest of the formula, did you mean substr(${LONG}, 3, 5)?
Hi James,
The issue is definitely with the last substr(), but the formula is supposed to take the first four digits of the LAT and LONG fields,not including decimals and -, therefore substr(${LONG}, 3, 5) will not work. I am looking into discussing with my colleagues to see if we can choose another combination of characters for this special ID (PDD_ID).
James,
I have since added in the additional character just to test the formula again and it does work. I did this three time for 3 different locations.
I then took out the added character and went with my original calculation. The first submission worked, but the second did not and I got the same error.
We have fixed our error!
Thanks James!
Erica