My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
   
SUBSCRIPTION STATUS
If you are a subscriber to this publication, sign-in to access locked articles. To subscribe or renew go to www.AdvisorStore.com.
Go to Article
Advanced Search 

ADVISOR TIPS

Use Notes Formula Language in LotusScript Code

You can tap the power of Notes Formula lanuage from LotusScript, if you know how to make the parameter call.

By Travis Wong, senior consultant, PricewaterhouseCoopers

I often find it useful to call upon Notes Formula language functions from my LotusScript code. You can do this with the LotusScript Evaluate function. You can use any Notes Formula language except UI commands.

The parameter of the LotusScript Evaluate function must always be a string, and the function must return an array. Let me show you how to render Lotus Formulat language as parameters the Evaluate function accepts.

To use Lotus Formula language by itself, surround it by LotusScript delimiter character"|" in the LotusScript Evaluate function.

In this example I use the Formula language @Name and @Username functions to display the common name:

Dim tempchoice as variant
tempchoice = Evaluate (| @Name([cn];@Username) | ) ' Returns an array
Msgbox Cstr(tempchoice(0))

To combine Notes Formula language with a LotusScript variable, put the Formula language function between "|" characters, and the LotusScript variable between "| &" and "& |".

In this example I display the IBM character set from 51 to 100:

Dim num As Integer
Dim returnanswer As String
Dim tempchoice As Variant

For num=51 To 100 Step 1
  tempchoice = Evaluate (| @Char( | & num & |  ) | )   ' returns an array
  returnanswer = returnanswer +Chr(10)+ Cstr(num) + "- " +Cstr(tempchoice(0))
Next
Msgbox Cstr(returnanswer)


Printer-friendly
page layout

What do YOU think about this topic? Share your advice and thoughts using this form.

Your Name

REQUIRED : PUBLIC

Your E-Mail

REQUIRED : PRIVATE

Job, Company

OPTIONAL : PUBLIC

City, State, Country

OPTIONAL : PUBLIC

Your Web Site

OPTIONAL : PUBLIC

Your Comment

Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

ARTICLE INFO

Web Edition: 2002.11.18, Doc #11365

FREE ACCESS FREE ACCESS

Keyword Tags: Application Development, Code, Development, IBM, IBM Lotus, IBM Lotus Notes, IBM Software, Lotus, Lotus Formula Language, Lotusscript, LotusScript, Programming, Software Development

Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
Portions copyright ©1983-2010 Advisor Media, LLC. All Rights Reserved.
Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, LLC in the United States and/or other countries.
Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
Hosted by Prominic.NET Website powered by
LOTUS SOFTWARE
oa WONGT001 posted 2002-11-18 mod 03/08/2010 03:10:14 AM ztdbms/ztdbms
domino-144.advisor.com my.advisor.com 03/10/2010 03:37:29 PM