Max length of a text field?

Good day,
I’d appreciate inputs from anyone who can help with the following:

What is the maximum length of a string that can be stored in a Text field?
And what about a calculated field - e.g. concatenation of 2 strings.
What happens if this is exceeded - does it just truncate?

Thanks,
Andrew

Hi Andrew,

On CommCare Android we don’t generally set an explicit limit on string
lengths. The platform will (from static analysis) identify if the form
itself wants to limit the length with the string-length function and
will prevent the user from typing more text after that point.

There are definitely some *platform *limitations you might run across if
you expected to be able to input an arbitrary string (like 5mb blob) since
we aren’t expecting string fields to contain that much raw data, but the
engine isn’t trying by default to provide a set arbitrary limit.

-Clayton

··· On Fri, Mar 31, 2017 at 11:14 AM, Andrew Cawood wrote:

Good day,
I’d appreciate inputs from anyone who can help with the following:

What is the maximum length of a string that can be stored in a Text field?
And what about a calculated field - e.g. concatenation of 2 strings.
What happens if this is exceeded - does it just truncate?

Thanks,
Andrew


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Clayton,

Great, thanks for the info.
The application of this question is in another question
https://groups.google.com/d/msg/commcare-users/TfGOPC8dZ4A/RgKtcUjnCAAJ

I’m wanting to know if that’s likely to cause problems over time, either
for displaying a long text field to the user, or for creating the
concat(). It’s not going to get anywhere close to 5MB (that’s a LOT of
text) but will definitely get past the 255 char limit that applies to some
platforms/languages.

Regards,
Andrew

··· On Friday, 31 March 2017 20:23:11 UTC+2, Clayton Sims wrote: > > Hi Andrew, > > On CommCare Android we don't generally set an explicit limit on string > lengths. The platform will (from static analysis) identify if the form > itself wants to limit the length with the *string-length* function and > will prevent the user from typing more text after that point. > > There are definitely some *platform *limitations you might run across if > you expected to be able to input an arbitrary string (like 5mb blob) since > we aren't expecting string fields to contain that much raw data, but the > engine isn't trying by default to provide a set arbitrary limit. > > -Clayton > > On Fri, Mar 31, 2017 at 11:14 AM, Andrew Cawood <acawo...@gmail.com > wrote: > >> Good day, >> I'd appreciate inputs from anyone who can help with the following: >> >> What is the maximum length of a string that can be stored in a Text field? >> And what about a calculated field - e.g. concatenation of 2 strings. >> What happens if this is exceeded - does it just truncate? >> >> Thanks, >> Andrew >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Andrew,

I wouldn’t anticipate this causing problems over time, and we actually use
this pattern as well in some of our applications.

-Clayton

··· On Tue, Apr 4, 2017 at 10:36 AM, Andrew Cawood wrote:

Hi Clayton,

Great, thanks for the info.
The application of this question is in another question
https://groups.google.com/d/msg/commcare-users/TfGOPC8dZ4A/RgKtcUjnCAAJ

I’m wanting to know if that’s likely to cause problems over time, either
for displaying a long text field to the user, or for creating the
concat(). It’s not going to get anywhere close to 5MB (that’s a LOT of
text) but will definitely get past the 255 char limit that applies to some
platforms/languages.

Regards,
Andrew

On Friday, 31 March 2017 20:23:11 UTC+2, Clayton Sims wrote:

Hi Andrew,

On CommCare Android we don’t generally set an explicit limit on string
lengths. The platform will (from static analysis) identify if the form
itself wants to limit the length with the string-length function and
will prevent the user from typing more text after that point.

There are definitely some *platform *limitations you might run across if
you expected to be able to input an arbitrary string (like 5mb blob) since
we aren’t expecting string fields to contain that much raw data, but the
engine isn’t trying by default to provide a set arbitrary limit.

-Clayton

On Fri, Mar 31, 2017 at 11:14 AM, Andrew Cawood acawo...@gmail.com wrote:

Good day,
I’d appreciate inputs from anyone who can help with the following:

What is the maximum length of a string that can be stored in a Text
field?
And what about a calculated field - e.g. concatenation of 2 strings.
What happens if this is exceeded - does it just truncate?

Thanks,
Andrew


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Perfect, thanks very much.

··· On Tuesday, 4 April 2017 16:44:51 UTC+2, Clayton Sims wrote: > > Hi Andrew, > > I wouldn't anticipate this causing problems over time, and we actually use > this pattern as well in some of our applications. > > -Clayton > > On Tue, Apr 4, 2017 at 10:36 AM, Andrew Cawood <acawo...@gmail.com > wrote: > >> Hi Clayton, >> >> Great, thanks for the info. >> The application of this question is in another question >> >> >> I'm wanting to know if that's likely to cause problems over time, either >> for displaying a long text field to the user, or for creating the >> concat(). It's not going to get anywhere close to 5MB (that's a LOT of >> text) but will definitely get past the 255 char limit that applies to some >> platforms/languages. >> >> Regards, >> Andrew >> >> On Friday, 31 March 2017 20:23:11 UTC+2, Clayton Sims wrote: >>> >>> Hi Andrew, >>> >>> On CommCare Android we don't generally set an explicit limit on string >>> lengths. The platform will (from static analysis) identify if the form >>> itself wants to limit the length with the *string-length* function and >>> will prevent the user from typing more text after that point. >>> >>> There are definitely some *platform *limitations you might run across >>> if you expected to be able to input an arbitrary string (like 5mb blob) >>> since we aren't expecting string fields to contain that much raw data, but >>> the engine isn't trying by default to provide a set arbitrary limit. >>> >>> -Clayton >>> >>> On Fri, Mar 31, 2017 at 11:14 AM, Andrew Cawood wrote: >>> >>>> Good day, >>>> I'd appreciate inputs from anyone who can help with the following: >>>> >>>> What is the maximum length of a string that can be stored in a Text >>>> field? >>>> And what about a calculated field - e.g. concatenation of 2 strings. >>>> What happens if this is exceeded - does it just truncate? >>>> >>>> Thanks, >>>> Andrew >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "commcare-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to commcare-user...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >