Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
alvinford
Contributor III
Contributor III

Simple Condition Check

Hi All,

I want to Check a condtion for the Variable using the Macro . I tried the below, its throwing an error.

if the vDetails Value is 2 then I want to display a msg box

 

sub Message
set albm =ActiveDocument.Variables("vDetails")
if(albm)=2 then
msgbox "You have items with No. Name"
end if
end sub

Regards,

Alvin.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You need

if(Albm.GetContent.String) = 2 then

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You need

if(Albm.GetContent.String) = 2 then

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
alvinford
Contributor III
Contributor III
Author

Hi Jonathan,

Thanks for the Reply. Need some more help from you.

The above is working fine. What I need is once the condition is Satisfied I want to set the Variable value as 1.

As the value Albm is 2 Want to set it to 1 using the Macro.

Regards,

Alvin.

alvinford
Contributor III
Contributor III
Author

Hi,

I could able to do it ..

Thanks .

Alvin