Select to view content in your preferred language

String or Binary data would be truncated Error!

830
4
09-11-2019 07:51 AM
EricaSummers
Emerging Contributor

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 

Tags (1)
0 Kudos
4 Replies
JamesTedrick
Esri Esteemed Contributor

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)?

EricaSummers
Emerging Contributor

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).

0 Kudos
EricaSummers
Emerging Contributor

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. 

0 Kudos
EricaSummers
Emerging Contributor

We have fixed our error! 

Thanks James!

Erica

0 Kudos