Home > Domino Tips > Developer > HTML > Simulating dynamic fields and labels
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

HTML

Simulating dynamic fields and labels


Sandeep Goyal
08.25.2004
Rating: -4.10- (out of 5) Hall of fame tip of the month winner


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


Often, one is faced with a situation in which they need to dynamically create labels and fields on the Notes client -- but there is no easy way to do this. The code in this tip simulates dynamic fields and label creation on the Notes client using a combination of HTML, JavaScript and Formula. This is a basic example of how to work around this issue. There is ample scope for enhancement.

This takes two, computed-for-display, multi-value fields whose values create the text and the dropdown options for the dynamically generated labels and drop-down fields. Since the dynamic fields are not really saved on the Notes client, an onSubmit JavaScript populates a hidden field with the field labels and values, so the field labels and data are stored and can be reused (maybe displayed in another form by dynamically generating HTML).

Form: DynamicFields

Set the property - Render Passthru HTML in Notes. Then create two 'Computed for Display multivalue text fields.

1. LabelValues: All Labels that need to created. (could be a lookup from a view). Sample value: "Label1":"Label2":"Label3."
2. DataValues: All option Values that need to be present on the dropdown lists. These need to be concatenated with the labelvalues to identify them.

Sample Values:
"Label1Data1":"Label1Data2":"Label1Data3":"Label2Data1":"Label2Data2":"
Label2Data3":"Label3Data1":"Label3Data2":"Label3Data3"

Create a Computed Text. Make this as passthru HTML and ad...


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



RELATED CONTENT
HTML
Create a dynamic fluid image gallery with Lotus Notes views
Write HTML and JavaScript in Notes view rows and columns on the Web
Open Lotus Notes documents in Microsoft Word without coding
Trap an attachment path via the Domino file upload control field
A bevy of Notes/Domino development tips
Styling Lotus Domino Web fields
How to convert Microsoft Word or Microsoft Excel documents to HTML
An easier way to view multiple columns on the Web
How to print a form in landscape format automatically
Tip contest winner: Hide view column while being able to sort it

HTML for Lotus Notes Domino
Create a dynamic fluid image gallery with Lotus Notes views
Write HTML and JavaScript in Notes view rows and columns on the Web
Open Lotus Notes documents in Microsoft Word without coding
Top 10 Lotus Notes/Domino coding and development tips of 2008
Trap an attachment path via the Domino file upload control field
Mimic Lotus Notes Domino application functionality on the Web
Top 10 Lotus Notes Domino programming and development tips of 2007
Creating a link on an HTML page to a Microsoft Word attachment in a Lotus Notes database
A bevy of Notes/Domino development tips
Top 10 Notes/Domino developer tips of 2006

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


d the formula behind this as:

This creates the dropdown "pseudo-fields" and dynamic table.

Next create an editable text field called "totalValue". This stores the labels and values of the "pseudo-fields" upon saving.

Next, to create a submit button for saving and closing the doc you can use:

Now when you submit the document the dynamically created fields are not saved, but their labels and values are inside the totalValue field as: "(Label1 - Data2)(Label2 - Data3)(Label3 - Data3)."

Possibly, you could even have the individual fields created with onUnload event by setting the field values, or even create a computed field with the appropriate HTML to display these values when the document is next opened. As programmers sometimes say, "We can do anything as long as we have the data!"

Hope you like this!

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

This tip was submitted to the SearchDomino.com tip exchange by member Sandeep Goyal. 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.




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