Solved

Line spacing on dynamic tables

Posted on 2000-03-12
8
184 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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
 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus notes "Estimate" form to Quickbooks invoice 2 361
Work Space in Lotus Notes cannot found 6 172
Lotus Domino Server 9 4 93
lotus notes, exchange 7 111
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

837 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