Calling a Lotus Script function from a Lotus formula

I need to call the Lotusus script function from Lotus Formula.

The function returns the result. I do not just want to run a script that does not return any value.

This is for Lotus Notes 7.

Example

LotusScript Features:

Function isName( name As String) as Boolean if name Is "Danny" Then isName = true endif isName = false End function 

Lotusformula

 name := getName("troy")??????? 

so I can use the name in the lotus formula.

Is it possible?

+4
source share
4 answers

No. The best you can do in Formula language is to invoke the LotusScript agent using either ToolsRunMacro or RunAgent @Commands, exchanging values ​​through document fields or environment variables.

+6
source

Cannot invoke and return a value in LotusScript from a formula language. However, you can go the other way using the LotusScript Evaluate method. Perhaps you can redesign your logic mainly in LotusScript.

+1
source

You can run the formula from LotusScript, but not vice versa if you are not using an agent because Stan has slipped away.

After several tedious years of developers, I usually consider writing lotusScript for most of my work, exceptions are only if I can write the formula in less than 10 lines and is unlikely to interact with other documents or update them.

As soon as you need to interrogate many fields in other documents or update them, write them in a script. The special function that you indicated in your question will also work as a formula, but if your desire is to be modular in a script, you should consider using a script in these situations exclusively instead of a formula. I would say that the "Formula" just reduces the time it takes to complete basic operations.

+1
source

Use an environment variable . Name it through the Formula Environment variable and use a script to access the environment variable and execute the code.

0
source

All Articles