Solved

Problem with Evaluate Function

Posted on 2000-04-26
3
414 Views
Last Modified: 2013-12-18
I have written an Evaluate Function in Lotus Script, Syntax as
Dim a as variant
Dim b as variant
a=Evaluate({@Explode("UK,US,USSR")})
b=Evaluate({@Explode("GERM,UJ")})
Status=Evaluate({@contains(a,b)})  'Problem is in this line @contains not working
MsgBox "The value of Status= "&Status(0)

In the above example, The values in b are not matching with the values in a, so The result of variable Status should be "0", but it is showing as "1". could anyone please help me in this.
0
Comment
Question by:skancherla
  • 2
3 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2753884
Hi Sanjay !

I dont think you can use a variant to pass the value to an evaluate statement.

Try replacing the a and b with the actual explode statements instead of passing them thru a variables.

Good Luck !

-Arun
0
 

Author Comment

by:skancherla
ID: 2756817
if i write like this

ReportStatus=Evaluate({@contains(@Explode("UJ,UK,GERM");@Explode("US,USSR,GERM"))})

            it will work fine

But actually what is required is,  Variables  a  &  b will contain the Document field values. for example,

          a=doc.country1(0)
          b=doc.country2(0)

for doing above, i have to use variables a and b in the below code as
        Status=Evaluate({@contains(a,b)})

by doing so, it is not working. i tryied using a and b with different data types like string & variant.But no result! if you have any better idea please let me know.
Your help is Appreciated men!!
0
 
LVL 9

Accepted Solution

by:
Arunkumar earned 11 total points
ID: 2761107
Hi Sanjay,

Dim session As New notessession
     Dim db As notesdatabase
     Dim view As notesview
     Dim doc As notesdocument
     Set db=session.currentdatabase
     Set view=db.getview("Test1")
     Set doc=view.getfirstdocument
     Dim a,b As String
     Dim formula As String
     Dim status As Variant
'if i write the statement like this
     
ReportStatus=Evaluate({@contains(@Explode("A,B");@Explode("C,D"))})
     Msgbox ReportStatus(0)
'it will work fine
'But actually what is required is,  Variables  a  &  b will contain the
Document
'field values. for example,
     a=doc.country1(0)
     b=doc.country2(0)

'for doing above, i have to use variables a and b in the below code as

'************************************************************
' My change is made here where i have included a String variable
'called as formula and built it. And Evaluate that formula
'************************************************************
     formula = |@Contains(@Explode("| & a & |") ; @Explode("| & b &
|"))|
     Status=Evaluate(formula)
     Msgbox "The value of status..."& Status(0)

Good Luck !

-Arun

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now