Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

VISIBLE HIDE OBJECT

Hello everyone!
I wanted to know how can I test with a macro, if an object is visible or not!
Thank you!
I await suggestions! [:'(]
Daniela
3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If the object is hidden/shown by a Conditional Show, you can test the same expression with the Evaluate function. You can extract the conditional show expression from the object with something like:

ActiveDocument.GetSheetObject("id").GetProperties.GraphLayout.Frame.Show.Expression.v

although the exact call path may vary with the object type.

-Rob

Not applicable
Author

Thanks Rob!
What you suggested is perfect!
Now the problem is to understand how to use education evaluate! I can not find even one example and in whatever way I feel, I always mistake!

set cp = Shtobj(i).GetProperties
if cp.GraphLayout.Frame.Show.Always = "Falso" then
msgbox(ObjCaption&" Condizione "&cp.GraphLayout.Frame.Show.Expression.v)

if cp.Evaluate(cp.GraphLayout.Frame.Show.Expression.v) then

msgbox(ObjCaption&" Condizione "&cp.GraphLayout.Frame.Show.Expression.v)
end if
end if

Grazie!

Daniela

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Daniela,

Evaluate is a member of Document. So the call to Evaluate would use ActiveDocument.

if ActiveDocumet.Evaluate(cp.GraphLayout.Frame.Show.Expression.v) then

-Rob