Is there a reason for the discrepancy between lengths for string fields created in Survey123 vs. AGO?

564
2
Jump to solution
04-04-2023 02:39 PM
Vinzafy
Occasional Contributor

Hey all,

Not a huge issue at all, but just wondering if anyone has an answer for this.

When a string field is created from S123, the default length is 255. However, when trying to manually create a string field in a hosted feature layer on AGO, the default length is 256.

If adding string fields of a default length to an existing layer, I have to make sure to change the default value in the AGO prompt from 256 to 255 so S123 Connect doesn't encounter a discrepancy with publishing.

Not a huge issue, but just curious if there is a reason for this!

Vinzafy_0-1680644366568.png

New field prompt from AGO (256)

 

Vinzafy_1-1680644282396.png

Parameters for a string field with default length created from S123 connect (255)

 

1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

I'd just consider it to a legacy thing. A byte used to be retained for informational purposes. Likely that one of the apps has moved to 256 and the other stayed with 255. More discussion here:

https://stackoverflow.com/questions/2340639/why-historically-do-people-use-255-not-256-for-database-...

For your workflow context, you can update to 255. Or in Survey123 Connect it'll just tell you the field length doesn't match up and you can set the esri custom columns to string and length 256.

You could create an ArcGIS Idea to have XLSForms/Survey123 default to 256 instead of 255 for string characters, but I imagine the (your) business need wouldn't be exceptionally strong.

View solution in original post

2 Replies
ChristopherCounsell
MVP Regular Contributor

I'd just consider it to a legacy thing. A byte used to be retained for informational purposes. Likely that one of the apps has moved to 256 and the other stayed with 255. More discussion here:

https://stackoverflow.com/questions/2340639/why-historically-do-people-use-255-not-256-for-database-...

For your workflow context, you can update to 255. Or in Survey123 Connect it'll just tell you the field length doesn't match up and you can set the esri custom columns to string and length 256.

You could create an ArcGIS Idea to have XLSForms/Survey123 default to 256 instead of 255 for string characters, but I imagine the (your) business need wouldn't be exceptionally strong.

Vinzafy
Occasional Contributor

Thanks for your reply and adding the Stack Overflow thread for additional context! Much appreciated. Good to have some idea as to why the discrepancy does exist.

I thought briefly about adding it as an idea, but it's such a trivial item and doesn't really impact things significantly. A topic I wanted to ask about more for curiosity's sake than anything. Thanks again!