Problem with Evaluate function in LotusScript & formula

I am having a problem with my Evaluate function in LotusScript. Here are several versions of what I have done and the comment above it is the problem with the code. What am I doing wrong? This should be so simple!

Thanks,

Trish

'THIS RETURNS AN ERROR “Unexpected: Nocache; Expected: Operator”

Dim EmpValues As Variant

EmpValues = Evaluate("@Trim(@Unique(@DbColumn("":"NoCache";"";"V_LK_REGBYEMP";1)))")

'BASED ON OTHER POSTS IN THE FORUM, TRIED VERTICAL BARS AROUND THE FORMULA AND GOT ERROR “Error in EVALUATE macro”

Dim EmpValues As Variant

EmpValues = Evaluate(|"@Trim(@Unique(@DbColumn("":"NoCache";"";"V_LK_REGBYEMP";1)))"|)

'TRIED BRACKETS AROUND THE FORMULA AND GOT ERROR “Type mismatch”

Dim EmpValues As Variant

EmpValues = Evaluate(["@Trim(@Unique(@DbColumn("":"NoCache";"";"V_LK_REGBYEMP";1)))"])

'TRIED CURLY BRACES TO GET NOTES TO IGNORE THE QUOTE MARKS WITHIN THE FORMULA; GOT ERROR “”

Dim EmpValues As Variant

EmpValues = Evaluate("@Trim(@Unique(@DbColumn({""}:{"}NoCache{"};{""};{"}V_LK_REGBYEMP{"};1)))")

'DOESN’T LIKE THE END CURLY BRACKET } BUT WHICH ONE?

Dim EmpValues As Variant

EmpValues = Evaluate("@Trim(@Unique(@DbColumn({""} & : & {"} & NoCache & {"} & ; & {""} & ; & {"} & V_LK_REGBYEMP & {"};1)))")

Subject: Problem with Evaluate function in LotusScript & formula

You can use like this

Dim EmpValues As Variant

EmpValues=({@dbcolumn()},Currentdoc)

you missing to pass the document handle.

hope this will work.

Subject: Problem with Evaluate function in LotusScript & formula

EmpValues = Evaluate(|@Trim(@Unique(@DbColumn(“”:“NoCache”;“”;“V_LK_REGBYEMP”;1)))|)

Try that

Subject: RE: Problem with Evaluate function in LotusScript & formula

Perfect! I knew it had to be something simple! I was putting quotes around my whole formula and then the | around that, but without the quotes but with the two vertical bars in place it works perfectly. THANK YOU, Yazdi!

Trish

Subject: RE: Problem with Evaluate function in LotusScript & formula

Perfect! I knew it had to be something simple! I was putting quotes around my whole formula and then the | around that, but without the quotes but with the two vertical bars in place it works perfectly. THANK YOU, Yazdi!

Trish