Help with LotusScript Evaluate method

Hi there!

I can’t seem to get the syntax right for my Evaluate method. I’m using @URLEncode to pass a variable through a URL and now I’m trying to use @URLDecode in a lotusscript agent to switch it back.

Dim webDoc As NotesDocument

Dim Desc as String

Dim DescConverted as Variant

Set webDoc = session.DocumentContext

Desc = Strleft(Strright(webdoc.Query_String(0),“&Desc=”),“&Name=”)

DescConverted = Evaluate({@URLDecode(“Domino”;“} & Desc & {”)},webDoc)

What is the correct syntax? I’ve seen different posts on this subject and tried a couple of them, but nothing works.

Gérald

Subject: Help with LotusScript Evaluate method.

I don’t believe that the token (webdoc) is required for this use. I also prefer pipes to curly braces, but that is just preference.

escConverted = Evaluate({@URLDecode(“Domino”;“} & Desc & {”)},webDoc)

coult be

escConverted = Evaluate(|@URLDecode(“Domino”;“| & Desc & |”)|)

Subject: RE: Help with LotusScript Evaluate method.

Couple samples that work

Dim eval as Variant

eval = Evaluate(“@DbLookup(“class”:“NoCache”;“db”;“view”;“key”;“field”)”,doc)

also

Set Doc = collection.GetNthDocument(a)

      eval = Evaluate("@Replace (Companies ;   ""Citibank""  ;  ""Citibank N.A.""   )   "  ,  doc  )          

      Call doc.ReplaceItemValue("Companies", eval)

      Call Doc.Save(True,  False)

Subject: What is actually returned? “”, @Error, something else?

Subject: Help with LotusScript Evaluate method.

Why not capture both of these values in hidden computed fields so you do not have to worry about evaulating it in script?

Subject: Help with LotusScript Evaluate method.

Thanks everyone!

With your help, I got it to work. Here is the code:

DescConverted = Evaluate(|@URLDecode(“Domino”;“| + Desc+ |”)|)

Have a great day!

Gérald