255 character limit on $record->display() ?

Archived from the Xataface Users forum.

rugcutter — Thu May 07, 2009 9:41 am

I’m trying to output the value from a column that is of type “text” in the database table. I’m seeing that the method call to $record->display() is only giving me the 1st 255 characters of the field.

I’m making the call within renderRow() within my delegate class. I wrote code to output the value within an HTML comment block, and I’m only getting the 1st 255 characters. My code looks something like this:

Code: Select all
`function renderRow ( &$record )
   {

      print(“”);
      print(“”); // this also only gives me the 1st 255 characters
   
   …`

I’ve tried getValueAsString(), and a few other functions on the Record class as well.

Where is this limit set? How can I indicate to give me the full value that is stored in the table?


shannah — Thu May 07, 2009 9:55 am

In list view, for performance reasons, only the first 255 chars of each field is loaded into memory. If you require a field to always load the entire contents you can specify struct=1 for that field in the fields.ini file:

e.g.

Code: Select all
[myfield]      struct=1

-Steve


fongchun — Thu May 07, 2009 10:06 am

Might want to check out this post too. It contains a little more information on the situation and some other solutions.


rugcutter — Thu May 07, 2009 11:02 am

Exactly what i needed. Thanks for the quick response!