Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
rein_nigul
New Contributor

VB function not work

Can anyone tell me why is the function in response to the "wrong"


Function test

vbPRoductID=5
set v = ActiveDocument.Variables("vbPRoductID")
v.SetContent vbPRoductID,true 

set v = ActiveDocument.Variables("vbPRoductID")
vPRoductID = v.GetContent.string

msgbox(vbPRoductID)
msgbox(vPRoductID)


if vbPRoductID=vPRoductID then
      msgbox=("Right")
else
      msgbox("Wrong")
end if
end function
 

 

Rein

1 Solution

Accepted Solutions
MVP
MVP

Re: VB function not work

Try like:

if trim(vbPRoductID)=trim(vPRoductID) then

      msgbox("Right")                                               ''''' typo '=' removed

else

      msgbox("Wrong")

end if

1 Reply
MVP
MVP

Re: VB function not work

Try like:

if trim(vbPRoductID)=trim(vPRoductID) then

      msgbox("Right")                                               ''''' typo '=' removed

else

      msgbox("Wrong")

end if

Community Browser