Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with Evaluate Function

Posted on 2000-04-26
3
Medium Priority
?
434 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 44 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

721 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