Blogroll

Misc

Subscribe
Add to Technorati Favorites


Blogarama - The Blog Directory

Evaluate, the bridge between Lotus Script and @Formula

October 3rd, 2009 by bfebrian

In lotus notes programming, I usually use Formula for simple program and Lotus Script for more complex program. I try to avoid many lines of Formula, because it difficult to read and not structured.

But, Formula have many method that Lotus Script do not have, like @Implode and @Explode. Even we can write our ownLotus Script function to do that, it just a waste of time and energy.

But, we have Evaluate in Lotus Script.

Evaluate  function is one of many of my favorite functions, because it able to run Formula and than pass the result of that Formula intoLotus Script variable (variant).

This is the syntax of Evaluate

variant = notesSession.Evaluate( formula$, doc )

We can use Evaluate function to pass the result from any kind of Formula,  from simple formula like @UserName to more complex formula like @Implode.

Recently, I use Evaluate in my program, to shorten the length of theLotus Script.

I need to calculate the difference in days between two date, but only in business days ( so saturday and sunday will not be counted also holidays).

Formula already have the function to calculate that, so I don’t need to create another lengthly Lotus Scriptfunction just to calculate that. I use the formula instead, so I need the Evaluate function.

varDay=Evaluate(“@BusinessDays(@Date(datFinal);@Date(@Now);1;datPublicHoliday)”,doc)

Remember that Evaluate function return value is variant.

With Evaluate, Formula and Lotus Script can coexist together.

Bookmark and Share

Popularity: 12% [?]

Tags: , , , , ,

Save to del.icio.us | Stumble It! | Submit to Netscape | Digg This!

Related Posts:

  • How to create your first notes database
  • Let’s promote OpenNTF
  • Sample Code: Shell function
  • Goodbye Rules_du_jour, Welcome sa-update
  • Send email notification with LotusScript
  • Posted in Lotus Notes and Domino, Programming | 1 Comment »

    One Response

    1. Evaluate, the bridge between Lotus Script and @Formula Domino, Email, Spam and IT Related » Auto Post Script Says:

      [...] In lotus notes programming, I usually use Formula for simple program and Lotus Script for more complex program. I try to avoid many lines of Formula, because it difficult to read and not structured. But, Formula have many method that Lotus Script do not have, like @Implode and @Explode. Even we can write our ownLotus Script function to do that, it just a waste of time and energy. But, we have Evaluate in Lotus Script. Evaluate function is one of many of my favorite functions, because it able to run Formula and than pass the result of that Formula intoLotus Script variable (variant). This is the syntax of Evaluate variant = notesSession.Evaluate( formula$, doc ) We can use Evaluate function to pass the result from any kind of Formula, from simple formula like @UserName to more complex formula like @Implode. Recently, I use Evaluate in my program, to shorten the length of theLotus Script. I need to calculate the difference in days between two date, but only in business days ( so saturday and sunday will not be counted also holidays). Formula already have the function to calculate that, so I don’t need to create another lengthly Lotus Scriptfunction just to calculate that. I use the formula instead, so I need the Evaluate function. varDay=Evaluate(”@BusinessDays(@Date(datFinal);@Date(@Now);1;datPublicHoliday)”,doc) Remember that Evaluate function return value is variant. With Evaluate, Formula and Lotus Script can coexist together. Download Free Article Spinner Thanks. [...]

    Leave a Comment

    Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.