Tech Tip: How to detect the "stored in record" field property
PRODUCT: 4D | VERSION: 12 | PLATFORM: Mac & Win
Published On: February 24, 2011
It is now possible to store text data outside of the record. In some cases it may be useful to get this information while the application is running. This can be done by using the structure XML file.
When you export the structure as XML, it lists whether a text field is stored outside of the record. Here are how the attributes are listed in the structure XML:
Setup | Attributes |
Text with "stored in the record" unchecked | type="14" |
Text with "stored in the record" checked | type="10" |
Text with "stored in the record" unchecked and specify a "Internal Storage max size" value | type="14" and text_switch_size="1000" |
So in order to detect the stored in record attribute for a field, export the structure definition as XML ahead of time, then parse through the XML file, and look for type="10". You would also want to check for the text_switch_size attribute, as this could cause a field to have its contents stored in the record.