Evaluate语句宏中的错误

时间:2017-03-10 13:25:04

标签: lotusscript lotus-designer

我遇到evaluate statement的问题。我试图在一个类中使用这个函数,因为我想将公式@DbLookup用于lotusscript。

这是我的班级代码

Class DirectorSucursal

    Private m_branch As String

    'Constructor class
    Public Sub New (branch)
        me.m_branch = branch
    End Sub

    'Deleter Class
    Public Sub Delete

    End Sub

    'Function show the field value
    Public sub GetBranch
        MsgBox m_branch
    End Sub

    'Function get the name director
    Public Function getNameDirector

        getNameDirector = Evaluate ({@DbLookup("":"NoCache";"C1256EAD:00478951";"People2"; "D" + m_branch; "FullName"})

    End Function

End Class

我在getNameDirector = ...

行中有错误
  

评估宏

时出错

我做错了什么?

由于

1 个答案:

答案 0 :(得分:1)

您的代码应为

getNameDirector = Evaluate({@DbLookup("":"NoCache";"C1256EAD:00478951";"People2"; "D} + m_branch + {"; "FullName")})

你必须将变量m_branch放在{...}字符串之外,而你错过了@ DbLookup关闭")"。