Solved

Line spacing on dynamic tables

Posted on 2000-03-12
8
177 Views
Last Modified: 2013-12-18
Greetings, experts!

Is there a way to align items on a dynamic table without using Lotus Script?

I created a dynamic table with two (2) columns.  One column is for Item Number, the other is for Description.  When the Description column exceeds the allowed space, it wraps to the next line.  Thus, the row corresponding to the Item Number is not aligned.

Example: Not aligned
ITEM NO    DESCRIPTION
03-12345  Box of goodies from Aunt Maggie that contains blah blah blah.....
03-67890  ...........  blah blah blah (end of 03-12345 Description)
                 Box of old personal effects from the Ice Age.

Ideal: Aligned
ITEM NO    DESCRIPTION
03-12345  Box of goodies from Aunt Maggie that contains .......
                 ...............  blah blah blah (end of 03-12345 Description)
03-67890  Box of old personal effects from the Ice Age.


Add'l info:  I'm developing in version 4.6.2.
0
Comment
Question by:KidLance
8 Comments
 
LVL 2

Expert Comment

by:Paebdb
ID: 2611594
As far as I know there is no way to prevend this, as you are just appending lines to a rtf, right ?
The only idea I have is to work with the string of the description.
If the size of the description is longer than the line, append a new line with
the number of chars the item number has added by the rest of the description.

In pseudocode:

if desc <= maxDesc
    Append itemNr+desc
else
    Append itemNr+maxDesc(desc)
    Append length(itemNr) * " "+restOfDesc
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2611705
Well,

I am forced to do this kinda job most of the time which i dont like.  I give a solution in a different way,

I truncate the value of the field to a specific length so that the extra characters does not wrap.

Also, i create a formula popup hotspot around the field and give it a formula so that when the user clicks on the content then the whole description pops up to read in full length.

The hotspot formula will refrence to a hidden field.
the actual Field will also referece to the hidden field with an @Left function.

Hope this might help....

Good  Luck !!!

-Arun
0
 
LVL 2

Expert Comment

by:Paebdb
ID: 2611711
Thats a nice idea !
0
 

Author Comment

by:KidLance
ID: 2614802
Thanks!  I appreciate your responses.  Your ideas are workable.  However, I have to stick with the problem I have.

Please allow me to elaborate. (Sorry if I left this detail out the first time.)  I'm working on two fields named ItemNo and Desc.  Both are computed text fields with New Line as text display separator.  To place values into these fields, I have ItemNox and Descx w/c are both editable text fields.  Once a button (named Add) is clicked, whatever values ItemNox and Descx have goes (appended) to ItemNo and Desc, respectively.  For as long as the user adds items, ItemNo and Desc "grows".


Paedbdb, your suggestion is OK for one or two lines of description.  However, I have to work on descriptions that go 4 to 5 lines.*

Arun, I need one solution that must always show the full description on the document form without using hotspots.*

I hope you two expert won't tire of my problem and continue to assist me.  For the other experts out there, please do pitch in.
= = = = = = = = = =
* Isn't it incredible what users sometimes demand from developers???
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:Paebdb
ID: 2615051
Still you can use my idea.
Check the length of the string first
Length(string) Div MaxLength = NumberofLines +1
 Now fill a structure, i.e. and array, run a loop and append more or less like I said before.

Ok, it's complicated, but it should be possible.
0
 

Accepted Solution

by:
DaddyDawg earned 75 total points
ID: 2620796
Some more suggestions:
First, make sure that your two "column" fields are using a monospace font, such as Courier.  Why? because the characters of a monospace font are all the same size - therfore you can determine exactly how many characters are on each line.

Next, I would use @Length to determine how long the description entry is. Divide this number by the number of characters/line allowed (I would reduce this number by a few to allow for words not fitting - so if the line allows 25 characters, I would use 20). This will tell you how many "pads" you need in your first column.  Now, when you add a new value to the first column, the formula would be:

YOURENTRY : @Repeat(@NewLine + "--"; (@Length(description)/charsperline))

So, if the description were 85 characters, and your allowed chars/line was 20, the value added to the first column would be:

SomeEntry
--
--
--
--

You use the dashes to hold the spots open.  Many times new lines and spaces are trimmed from fields, so this preserves the space.

Rock
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2626514
Hi Kidlance

Users are always demanding, and they are like hammer which shapes up the iron and makes sharp, just a comment.

Ok I have already done this kind of application and it works similar to what u have asked for...

The idea behind this is same as the one DaddyDawg described. Except for in the First column you can add space, unless u don't trim the field there is no problem, hope DaddyDawg agrees with that.

PS: The spacing in the input dialog and that on the host form should be manipulated so that it fits the screen properly, still there would be problems when user resizes the notes window. Anyway on the print it looks pretty good.


Good Luck
~Hemanth

0
 

Author Comment

by:KidLance
ID: 2665994
Seems that DaddyDawg's answered the nearest solution.  Thanks a lot!

To the others who contributed, I wish I could share a number of points for each one of you - the time and effort you gave to assist me is highly appreciated.

And Hemanth, you were right about the user being "the hammer that shapes the iron, making it sharp" ... but allow me to add:

"They are hammers that has the power to shape iron - to make it sharp or make it shapeless."
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now