Referenced Data Structure: Strings to Text 50

I noticed that when referencing a web method, the associated data structure for that web method underwent some data-type changes.

Data fields declared as 'strings' in the extensions/web method, were referenced as 'Text 50' within service studio. Is this always the default behaviour? and does this affect data in any way (which may be over 50 characters in length?) ...

Will the platform perform any further checking on data or throw application errors when using these strings which contain data of length greater than 50?
e.g. I am referencing a web service for which I know nothing about (since I did not write it), which returns data in a structure which does not truncate the displayed data, (even though it exceeds 50chars) but does throw runtime errors when I try to manipulate this data, e.g. write the data structure into a temporary table for sorting purposes (temporary table entity has values of type text 50, as per the referenced structure's data type) ...
Hello Declan,

The translation from "string" to "text 50" is in fact the default behavior of the platform. This size indication has no impact on the data itself, the string isn't truncated and no exceptions are raised.

This number is used when you build "edit records" using the structure. In this scenario the edit field created inside the edit record will have a maximum length of 50. This value can be changed if required.

When you want to place the information in an entity the behavior is a bit different. Again there is no data manipulation on the runtime, but when you try to write the information to the database the database itself will issue an error.

To solve this particular problem all you have to do is increase the size of the attribute in your entity definition.

Hope this helps,
Thanks Rodrigo,
I appreciate we can increase the entity size, my query is more in terms of improving the platform somehow to handle this small datatyping weakness ...

How can I know what to increase the size to, when I don't know what the data size is .... i.e. the platform tells me 50chars, but only during runtime am I receiving errors that the size is greater than this through the servicecenter error:
"String or binary data would be truncated.
The statement has been terminated."
... i.e I have no awareness of what the size of the piece of data is that is being truncated.

Sure I can keep incresing the entity structure size ... until the next truncation error?

Are there any plans to leave the 'length' attribute for Text fields optional?
Hello Declan,

I agree with you, it would be very useful to have the length attribute for text fields optional. I've already submitted an issue for the development team with your suggestion.

While this feature isn't added to the product there is a simple workaround that you can use to make sure that this error doesn't occur. If you set the value of the length to something greater than 2000 the OutSystems Hub Edition will optimize that field and make it a "text" database field. This means that the limitations you're having will no longer occur.

Hope this helps,