Is it possible to create a dynamic table in Lotus Notes R5

I am new to Notes development (All development) and I need to create a dynamic table in the form so the user can enter as many rows as necessary.  I have tried working with an embedded excel spreadsheet, but it is clumsy when it opens and I keep getting errors.  Can anyone help me?  This one problem is holding up the entire project.
jtennysonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HemanthaKumarCommented:
Is this table a fixed rowXcol one ?

And is this table being inserted in a rich text field ?? How do you want it ?

Also are you looking for some data fields in this table ?

PS: If you are using R6, you can create table on DYNAMICALLY !! For R5 there is no such direct method.

~Hemanth
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HemanthaKumarCommented:
I believe you want a std table of fixed row and cols !

If that is what you want do this..

1. Create a form (say, Table) with one RichText Field Call it RT and save the form
2. Create a view (say, TableView) which has selection formula as
   Select Form = "Table"
3. The view's first column should be sorted with following formula.. @Text(@DocumentUniqueID).. Save the view
4. Create a document using Table form and draw table in the RT field and save it.. THis doc should be listed in the view that you created
5. Now in the form where you want the table to be inserted.. Write this formula to the richtext field which will import the table that you created in step 4

temp := @DBColumn( "Notes":"NOCache"; @DBName; "TableView"; 1);
DocID := @if( @iserror(temp); @Return(""); @subset(temp;1));
@GetDocField( DocId; "RT");

Now the contents of RT field is downloaded to your field..

0
ksi2001Commented:
dynamic tables are not supported. you can bypass this either with Hemantha's method, or using hide/when formulas for the table rows.

However your table will be limited by some number of rows.


As for spreadsheet, try to use Microsoft Office Spreadsheet control. It's not heavy and may be you'll get rid of errors.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

qwaleteeCommented:
For the web, this is possible.  For the Notes client, it is not possible using just the Notes client itself -- you would need some sort of embedded object.  You don't seem to like embedding Excel for this, but I shoudl tell you, that's pretty much the standard way to do this.

Using just Notes, you can have a dynamic table WITH A LIMIT, i.e., you can predefine say, ten rows, and use hide-when to only display some of the rows, or all of the rows.
0
Sjef BosmanGroupware ConsultantCommented:
All other respondents seem to forget that you talk about inputting values in a form, the user has to enter many rows. Here's a suggestion, which works for me, albeit with some drawbacks:
- don't use fields of the form "field_1", "field_2", etc, but use multi-value fields
- create a one-line table with the columns you want
- put the fields you want in the columns, each in one
- make all fields computed, text, multi-value separated by new-line
- create a sub-form in which you manipulate one line at a time, changing fields etc.
- provide the necessary logic to add or delete lines, or to move lines up and down
- see to it that each field has the same number of values

The table will display all lines nicely, but only if your data isn't too wide. Using the above, I can create e.g.  orderforms with a variable number of orderlines without any problem. Using an unknown number of fields will never be a solution, not even in R6.
0
qwaleteeCommented:
sjef_bosman,
> other respondents seem to forget
Who says?  I've got drawbacks, you've got drawbacks.  Whatever floats your boat!
0
Bozzie4IT ArchitectCommented:
There are several ways to do this, using workarounds.

Get it here:
http://www.martinscott.com/designlibrary.nsf/scategory/D0211DEA704D91CA85256C08001DF283?opendocument

This creates a rtf file, that is imported into a richtext field on your form afterwards.  You haven't got a lot of control over the look of the result, but is does do the trick.  In fact, I've used this soluiton extensively over the years (both in R4.6 and R5).

Tom
0
Bozzie4IT ArchitectCommented:
Another possibility:

Use an embedded view in your form, where you show the data (actually stored in individual documents ) to the user.
To add a 'row', you create a new document, that will appear in the embedded view.
Some drawbacks in this approach include the very poor printability of the embedded view.

Tom
0
Sjef BosmanGroupware ConsultantCommented:
Sorry, went to hospital yesterday. Back in business now.

I'm quite sure the drawbacks of my method aren't half as awful as all the others ;-)
1. it requires an additional (sub)form for the DialogBox
2. a single fieldvalue shouldn't be longer than the width of the table column the field is put into.

Advantages:
1. no unused fields
2. no field shortage when one requires 11 lines where max 10 are prepared
3. no hide-when proliferation
4. no copy-paste mishaps of fields

There must be more...
0
qwaleteeCommented:
Hope you are feeling better
0
qwaleteeCommented:
Tom,

Thought you'd gone missing!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.