Error in Evaluate statement macro

北城余情 提交于 2019-12-24 08:45:16

问题


I have a problem with an evaluate statement. I am trying to use this function into in a class, because I want to use the formula @DbLookup into lotusscript.

This is my class code:

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

I have an error in the line of getNameDirector = ...

Error in evaluate macro

What am i doing wrong?

Thanks


回答1:


Your code should be

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

You have to put variable m_branch outside the {...} strings and you missed @DbLookup's closing ")".



来源:https://stackoverflow.com/questions/42719504/error-in-evaluate-statement-macro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!