Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

How do I truncate data in browse column?

Locked
JohnKlassen
Posts: 148
Joined: Wed Dec 05, 2012 4:56 am

How do I truncate data in browse column?

Unread post 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
You do not have the required permissions to view the files attached to this post.
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: How do I truncate data in browse column?

Unread post 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.
You do not have the required permissions to view the files attached to this post.
JohnKlassen
Posts: 148
Joined: Wed Dec 05, 2012 4:56 am

Re: How do I truncate data in browse column?

Unread post by JohnKlassen »

Max,

That worked!

Thanks a lot.

John
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: How do I truncate data in browse column?

Unread post by admin »

John,

Or you could just change the height..
cap.PNG
Steven
You do not have the required permissions to view the files attached to this post.
JohnKlassen
Posts: 148
Joined: Wed Dec 05, 2012 4:56 am

Re: How do I truncate data in browse column?

Unread post by JohnKlassen »

Steven,

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

John.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: How do I truncate data in browse column?

Unread post by admin »

.
Locked