I've written a function in LotusScript which returns a value and works
great. Unfortunately I need to get this value in a Field (which only works
with @formulas). Does anyone know of a way of calling a LotusScript
function from an @function?
I'm using R5.
Many thanks in advanced...
<in...@madmediaworks.de> wrote in message news:8s6on6$8r6$1...@news.online.de...
With Evaluate you can call @function from lotus script. Just type evaluate
in searching the help and look at the samples.
Tomsky
I'm afraid there is no way to extend Formula Language with
LS.
The main reason Lotus/Iris prevented this might be that the
behaviour/performance/reliability of formulas is predictable
whereas in LS it's not. Since views and view indexing relies
haevily upon formula language they don't want to tempt
developers to de-stable basic functionality or performance.
So the only way to insert LS results into a form is
event-driven (agent, action, change-focus aso). Maybe that's
the way to go..
--
Wolfgang Flamme
wfl...@mainz-online.de
Well, there is (I'm using a view with a @dblookup statement) but when
documents are created and saved, the @dblookup formula with the view doesn't
seem to be refreshing properly, where as the LotusScript function is.
Any ideas why the @dblookup/view is not refreshing? I'm using the "NoCache"
feature of DB lookup!
Andy Goodchild schrieb:
Here's how you do my workaround for this...
In Formula you trigger your script code this way:
scriptCode is a hidden text field with default value "N"
FIELD scriptCode := "Y";
REM " \'ViewRefreshFields\' use line below to trigger PostRecalc event" ;
REM " The PostRecalc event is simply convenient to use since it can be
triggered by ViewRefreshFields" ;
@Command([ViewRefreshFields]);
FIELD scriptCode := "N";
REM " Now the code will not be triggered on any other refresh ";
In the form postRecalc() event you use a conditional statement:
' source is current uidoc
If source.FieldGetText("scriptCode") = "Y" Then
returnVal$ = yourFunction(params)
Call source.FieldSetText("yourField" ,returnVal$ )
End If
now you have the return value in a form field (yourField) ready
to use in the next formula statement.
Simple but functional. Well used in my systems.
Pete