Home > Domino Tips > Developer > Formula > Create a dynamic table row
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

FORMULA

Create a dynamic table row


Phani Kiran
10.06.2004
Rating: -3.40- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


View member feedback to this tip.

This tip shows you how to create a dynamic table row creation with the help of Formula at runtime.

  1. Create a form "TableForm" with the following fields:
    Key - Text field
    Table - Rich text field.

  2. Save the form.

  3. Create a hidden view "(Table)" with view selection formula as:
    SELECT ((Form = "TableForm"))

  4. Create a column (no need for column name), give the value as field "Key" and then sort ascending/descending order.

  5. Compose "TableForm" form.

  6. In the first field "Key" enter "Table" (without double quotes).

  7. In a rich text field from Create Menu, click on Table, select number of columns and rows and then click OK.

  8. Save the document.

  9. Open the form where you want the dynamic table to be placed.

  10. Create a rich text field with the following default formula:
    @DbLookup("":"Nocache";"":"";
    "Table";"Table";"Table")
    

  11. Compose the form and you will see the table. As you press tab, the rows keeps on increasing.

MEMBER FEEDBACK TO THIS TIP

I can't make this to work. I don't receive any errors, it just doesn't do anything. On the final form with the default formula in the rich text, I get a blank field -- not a table. I get the same results in R5 and R6.

—Gregg B.

******************************************

@DBlookup may or may not run on local databases. If the database is hosted on a server then it runs perfectly. For local databases we have to specify the database name, otherwise it won't work. This is written specifically in Notes help.

In R6 I have tested on a local database and it worked as it should. But with R5 it gave me a problem (with the @dblookup function).

So, the solution could be specifying server and database name in the dblookup function as:


@DbLookup("":"Nocache";"":"test.nsf";
"Table";"Table";"Table")

Where test.nsf is the name of the database and "" before it indicates that the server location is local.

— Phani, tip author

******************************************

I have a table with a row and 10 columns. Each column has a field of type: Text, Computed, Allow multiple values and Display separate values with "New Line." My question is: Can I have a dynamic table and have fields that do not allow multiple values, and the Script go adding rows to my table?

—Liliana O.

******************************************

I don't think it's feasible, because it's not possible to create a dynamic field in Lotus Notes. This table implementation is nothing but a table created at design time in a rich text field and using it in different forms for dynamic purpose.

So, the answer is you can add dynamic rows to a table using script but not fields in it.

—Phani, tip author

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Phani. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Formula
View hidden fields on Lotus Notes/Domino forms
Case-insensitive @Unique version combines fields on Lotus Notes forms
Provide rich-text formatting via the Profile document and Formula
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Formula language button manages Deny Access list searches
Retrieve Lotus Notes names from a nested group using @DBLookup
Create a computed Lotus Notes field to list Personal Address Book names
Show multiple Lotus Notes document fields in a single view column
How to send a document as a link in a Lotus Notes email

Lotus Notes Domino Formula Language
View hidden fields on Lotus Notes/Domino forms
Case-insensitive @Unique version combines fields on Lotus Notes forms
Do I use Formula or LotusScript to include a doclink to a Notes view?
Top 10 Lotus Notes/Domino coding and development tips of 2008
Provide rich-text formatting via the Profile document and Formula
Top 10 Formula language tips
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Stop response documents from showing in a Lotus Notes form
Formula language button manages Deny Access list searches

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts