| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I have a database (Notes 6.5.4) that needs to have a table created when either first opened or at the press of a button, that will insert an editable table of 3 columns and 4 rows. I need to be able to have the column headers already formatted and the user needs to be able to append new rows as needed. I looked at the help file for Designer 6.5 but it didn't really make sense. Any ideas? Mark Anderle |
|
#2
|
| You can't just make a new form that has the table pre-defined in it? |
|
#3
|
| One way of doing this (not necessarily the best) is to: Store the table in a field of another form or the profile document Create a script to copy the field from the other form to the required field in the document. The script could be attached to an action button or the postopen action. HTH Ultan "Mark P. Anderle" news:QmQIe.93128$3j2.3243043-at-twister.southeast.rr. com... > I have a database (Notes 6.5.4) that needs to have a table created when > either first opened or at the press of a button, that will insert an > editable table of 3 columns and 4 rows. I need to be able to have the column > headers already formatted and the user needs to be able to append new rows > as needed. > I looked at the help file for Designer 6.5 but it didn't really make sense. > > Any ideas? > > Mark Anderle > > |
|
#4
|
| "Mark P. Anderle" news:QmQIe.93128$3j2.3243043-at-twister.southeast.rr. com... >I have a database (Notes 6.5.4) that needs to have a table created when > either first opened or at the press of a button, that will insert an > editable table of 3 columns and 4 rows. I need to be able to have the > column > headers already formatted and the user needs to be able to append new rows > as needed. > I looked at the help file for Designer 6.5 but it didn't really make > sense. > > Any ideas? There was a session about this at Lotusphere 2004. The solution I am using (based on that session) may or may not help you. but it involves building each row as a separate document in memory using the backend classes and a template form with the layout of one row (including header, fields, formatting, etc). You then use RenderToRTItem() to add the document you just created to a rich text field in the target document. Repeat once for each row. By using a counter in your code, a hidden field on the template form, hide-when on the template form to only display the header when the counter is 1, and a few othe rtricks, you can build a very nice table, basically looking any way you like. There are some limitations to this method, of course. You may be able to locate the session information online, perhaps you can still order the tapes of the session. You may also look through your copies of The View or Lotus Advisor (or whatever they are called at the moment), the method may be described there as well. I think it may have been BP114 - Extreme Lotusscript by Rocky Oliver, but I may be wrong. /Karl |
|
#5
|
| Appreciate the answer. Any idea how? I've not had to try and do this before. Mark Ultan Rooney wrote: > One way of doing this (not necessarily the best) is to: > > Store the table in a field of another form or the profile document > Create a script to copy the field from the other form to the required field > in the document. > > The script could be attached to an action button or the postopen action. > > HTH > Ultan > "Mark P. Anderle" > news:QmQIe.93128$3j2.3243043-at-twister.southeast.rr. com... > > I have a database (Notes 6.5.4) that needs to have a table created when > > either first opened or at the press of a button, that will insert an > > editable table of 3 columns and 4 rows. I need to be able to have the > column > > headers already formatted and the user needs to be able to append new rows > > as needed. > > I looked at the help file for Designer 6.5 but it didn't really make > sense. > > > > Any ideas? > > > > Mark Anderle > > > > |
|
#6
|
| You could add the following script to an action button in a view to create a new document. This script probably could have been written better but it seems to work. YMMV Ultan Sub Click(Source As Button) Dim session As New NotesSession Dim workspace As New NotesUIWorkspace Dim Database As NotesDatabase Dim uidoc As NotesUIDocument Dim RosterDoc As NotesDocument, TemplateDoc As NotesDocument Dim itemTemplate, itemRoster As Variant Dim view As NotesView ' Create the new Roster Doc Set Database = session.CurrentDatabase Set RosterDoc = New NotesDocument(Database) ' Create a new Body RT item Set itemRoster = New NotesRichTextItem(RosterDoc,"Body") ' Get the Template document Set view = Database.GetView("Templates") Set TemplateDoc = view.GetFirstDocument ' Get the Body item from the template doc Set itemTemplate = TemplateDoc.GetFirstItem("Body") ' Copy the body item from the Template document to the Roster document Call itemTemplate.CopyItemToDocument(RosterDoc, "Body") ' Set the form type RosterDoc.Form = "Roster" ' Edit the document Call workspace.EditDocument(True,RosterDoc) End Sub news:1124132733.571859.211000-at-f14g2000cwb.googlegr oups.com... > Appreciate the answer. Any idea how? I've not had to try and do this > before. > > Mark > > Ultan Rooney wrote: > > One way of doing this (not necessarily the best) is to: > > > > Store the table in a field of another form or the profile document > > Create a script to copy the field from the other form to the required field > > in the document. > > > > The script could be attached to an action button or the postopen action. > > > > HTH > > Ultan > > "Mark P. Anderle" > > news:QmQIe.93128$3j2.3243043-at-twister.southeast.rr. com... > > > I have a database (Notes 6.5.4) that needs to have a table created when > > > either first opened or at the press of a button, that will insert an > > > editable table of 3 columns and 4 rows. I need to be able to have the > > column > > > headers already formatted and the user needs to be able to append new rows > > > as needed. > > > I looked at the help file for Designer 6.5 but it didn't really make > > sense. > > > > > > Any ideas? > > > > > > Mark Anderle > > > > > > > |
![]() |
| Thread Tools | |
| Display Modes | |