Page 1 of 1

How do I truncate data in browse column?

Posted: Mon Dec 31, 2012 5:33 am
by JohnKlassen
Hi,

I have a field called description that is defined as a 'text' field in the database. It is a fairly lengthy. When I am in the edit form, I want to display all of the contents of the field. When I am in the Browse form, I want to only display the content based on the 'width' option. I have set the 'width' to 600 but then it still shows the top of each character from the next line.
Truncate_Field.png
Is it possible to truncate the display of the field to the defined 'width' or do I need to set the 'height' of each line somewhere?

Thanks,

John

Re: How do I truncate data in browse column?

Posted: Mon Dec 31, 2012 8:54 am
by massiws
John,

in forms Browse tab > Display field, you can specify a field name or a SQL function (see http://wiki.nubuilder.com/tiki-index.ph ... uilderDocs).

You can use SQL LEFT(field_name,lenght) or SUBSTR(field_name,start,lenght) functions to specify how many characters to display:
img.png
Hope this helps.

Re: How do I truncate data in browse column?

Posted: Tue Jan 01, 2013 6:44 am
by JohnKlassen
Max,

That worked!

Thanks a lot.

John

Re: How do I truncate data in browse column?

Posted: Wed Jan 02, 2013 1:06 am
by admin
John,

Or you could just change the height..
cap.PNG
Steven

Re: How do I truncate data in browse column?

Posted: Wed Jan 02, 2013 4:04 am
by JohnKlassen
Steven,

I like both options for different reasons. Thanks for the alternative suggestion.

John.

Re: How do I truncate data in browse column?

Posted: Wed Jan 02, 2013 6:58 am
by admin
.