Solved

Line spacing on dynamic tables

Posted on 2000-03-12
8
174 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

12 Experts available now in Live!

Get 1:1 Help Now