Solved

Problem with Evaluate Function

Posted on 2000-04-26
3
432 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

636 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