Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Blogs

photo

Lotus Nut

57 Entries |  Chris Whisonant
Updated 
Ratings 3     Comments 90
photo

Big A** Mutan...

42 Entries |  Michael Smelser
Updated 
Ratings 1     Comments 41
photo

McGarelGrammi...

12 Entries |  Mike McGarel
Updated 
No Ratings 0     Comments 11
photo

Yellow is the...

47 Entries |  Tim Tripcony
Updated 
No Ratings 0     Comments 14
photo

off the Hook

19 Entries |  Scott Hooks
Updated 
No Ratings 0     Comments 28

TexasSwede

Blog Authors:  Karl-Henry Martinsson  

All entries tagged with development

SNTT - Custom tabs in Notes client

Karl-Henry Martinsson  |    |  Tags:  sntt development show-and-tell-thursday  |  Comments (4)

 We all know that Notes let us create tabbed tables. But you have limits to how nice you can create the tabs.

In an application I am working on, I wanted full control of the tabs, and I found out it was actually pretty easy to create my own tabs. I just used a computed background, something I actually never used before.

By the way, I stoleborrowed the graphics from Yahoo Mail for now, until I get the final graphics created...

 

The application displays information about the (insurance) claim selected in the drop-down box. Each claim has one or more claimants (affected people/parties), and I display them in the tabbed section. You can see the tabs in the screenshot below.

 

What I simply do is to keep track of the currently selected claimant, the number of claimants, and then I built a table with 3 columns in the first row and one merged cell as the second row.

In the center cell in the first row, I set the background to the "active colored" (lighter) tab. I use @Formulas to set the background in the two other cells:

@If( @TextToNumber(CurrentClaimantNumber) > 1; "CCdb_InactiveTab.gif"; "" )

and

@If( @TextToNumber(CurrentClaimantNumber) < @TextToNumber(LNPClaimantCount); "CCdb_InactiveTab.gif"; "" )

 

The inactive tab is the darker one. Then it is just a question about writing code that trigger when the lables (computed-for-display fields) are clicked, to update the current claimant value, load the claimant data and refresh the form.

 

I hope you get some inspiration from this. Oh, and this is all Notes 5...

Simple but effective code

Karl-Henry Martinsson  |    |  Tags:  development lotusscript  |  Comments (0)

The other day I was writing some code where I had to check a value against a list of potential values. I was importing a file as XML, and checking a number of transactions, each in their own node. If the Trans-ID tag had one of several values, the whole node was supposed to be discarded and not used.
I am sure many already use this method, but hopefully someone will learn something new.
In my example below, I am reading a field in a Notes document instead of data from an XML file, but the principle is the same:

tranType = Ucase(doc.GetItemValue("txn-type"))
If Instr("PD;DR;RP;NSFNF;RD;CRT;RCT;VCK;TPD;RCK;", tranType & ";") Then

End If

What I do is to use Instr() to check a string (the first argument) for the presence of a particular string (the second argument). To make sure I don't get any false matches, I add a semicolon to the end of the tranType as well as use the same character to separate the values in the first argument.

The Instr() function returns the position of the string found (1 or higher if found, 0 if not found). Since 0 is "False" and everything else is "True", if the tranType string is found, a value greater than 0 is returned, which is considered "True".


This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.