New Ideas

If you have not already done so, I suggest you download the current NotesDesign database.
The ideas listed on this page are new and do not duplicate the existing database.

Instead of releasing a new version of the NotesDesign database, I've decided to "publish" new ideas as I work on them.

I, invite you to play with these ideas. Any suggestions or additions, etc. Please send me email / feedback. As I work on these ideas, I will add very small NSF files to demonstrate each one.

The bulb icon indicates an idea being worked on, I'll add other icons to indicate ideas that seem to be "complete".

Needless to say, being works in progress, I expect you to accept responsibility for, and thoroughly test any code snippets included here. Borrower beware !

<<< .NSF Example of the following

Ever wanted a view to appear as above, with line breaks in the column ?

To accomplish this, I employed the following technique...
First create a computed field, ( for example "ViewText" ), on the source form with the following formula:

@Explode(
@If(AddressFullName!="";AddressFullName+"~";"")+
@If(AddressName!="";AddressName+"~";"")+
@If(AddressStreet!="";AddressStreet+"~";"")+
@If(AddressStreet2!="";AddressStreet2+"~";"")+
@If(AddressCity!="";AddressCity+", ";"")+@If(AddressState!="";AddressState+" ";"")+@If(AddressZip!="";AddressZip;"");
"~")

As you can see, the ViewText field is constructed by concatenating the ( non-blank) desired fields, separating them with a tilde (~).
The resulting string is then exploded into a text list.

In the view, the properties for the "ViewText" column are set as follows:
Multi Value separator: NewLine and Line per row: 6
The view properties are set to include: Shrink rows to content.

 

Displaying a large amount of information in a view.
The idea behind this view is to have the total population be displayed as bar of icons of fixed length. (in this case 20). The display allows those 20 icons to appear anywhere in the width of 40 columns. The center point is considered "zero" or a change in state. The icon images can change to be anything from the
Table of column icons. Using this approach it is possible to display a large amount of information in a single view:
One can easily see where the population lies: What fraction lies each side of center.
Displaying the population as different icons can show the population breakdown and how the categories relate to the + / - scale.
For example, if the center divides employed from unemployed, icons could be used for those earning beneath the poverty line, those earning more than $50,000 .... etc.

Another example might be to display voting behavior, citizens who consider themselves "to the right" could be to the right of center. Voters and non voters could be shown using different icons.

This type of display can be created by defining 41 fields on your form. ( Cell_1,Cell_2 etc.) and declaring them as calculated fields.
Zero would be the default, the calculation would yield the number needed display the required icon.
The columns on the view would be set to "display values as icons".

 
Another, simpler, way to display quantitative information in a view.
This view contains a column with a formula...

@Repeat ( "|";@Length(HowToTitle))+">>"

In this example the line represents the number of characters in the "Howtotitle" field of the document.
You can put in here any calculation that gives a reasonable integer i.e. ( 0 - 120)

  Using a different form to view a document

Sometimes it is useful to see the information on a document displayed in a non-standard way.
This can be useful if the user wants to see the same information formatted as a report.

Imagine you have a form called Contact.
Create a copy called, for example, ContactReport
Add a computed text field to the ContactReport called
SAVEOPTIONS; set the value as "0".
This will ensure that the document can not be saved with the "ContactReport" as its primary form.
Set up a view called "Contact reports" in which the Contact documents will be displayed using the report form.
Under view properties, go to the beannie hat tab, and next to Form formula, click on formula window.
Enter a Form formula such as:
@if(Form="Contact";"ContactReport";form)
For this view, Contact documents will be displayed using the new report form; all other documents in the view will use their normal form.

  Presenting information using a DialogBox.

There are times when it would be great to be able use a dialogbox to display information to the users (see next entry).
You create a button (on a navigator, for example) with a formula...

@DialogBox( "InfoDialog"; [AutoHorzFit] : [AutoVertFit] : [NoCancel] : [NoNewFields] : [NoFieldUpdate] : [ReadOnly] ; "" )

hoping that the popup form "InfoDialog" will be displayed. Instead you get the error shown below.


DialogBoxes can only be displayed when a current document has been selected.

To avoid this problem, create a lotusscript agent to display the dialogbox and call this as a macro from your (navigator) button.

Create a lotusscript agent ( selecting "Run Once (@Commands may be used)" ) called, for example, DisplayPopup.

The code under initialize is..

Sub Initialize
Dim workspace As New NotesUIWorkspace
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = s.CurrentDatabase
Set doc = db.CreateDocument

Dim Choice As String
Choice = workspace.DialogBox ( "InfoDialog", True, True, True, True, True, True, "" ,doc)

End Sub

The advantage here is that the code creates a dummy document (doc) before calling the dialog box.
and because you do not call doc.save before exiting, the dummy document does not get saved.

Now in the navigator button you can put the formula...

@Command([ToolsRunMacro];"DialogPopup")

and the dialog box will appear as you wanted.

 

This entry uses the previous idea to create a Popup dialogbox, presenting the user with information

When a remote user is having problems replicating, I've found it useful to get some basic information from them. This dialog box was designed for that purpose..

The formula for the first field is simply .. @Name([CN];@UserName)

For "Your current access", the formula is...

sA := @Subset(@UserAccess( @DbName );1);
@If(sA="1";"Depositor";sA="2";"Reader";sA="3";" Author";sA="4";"Editor";sA="5";"Designer";sA="6";"Manager";"")

For "Your current roles", the formula is.....
@UserRoles

I'm sure you can see how this idea can be extended

Attaching files to documents using code.

This database example reads through the documents in a view and to each document, attaches a matching file found in a specified directory.