Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Explanation for APIGuide methods not working

Hello all,

Earlier I was trying to simulate hide and unhide functionality using a macro.

I was not even successful using the Button.Maximize or Button.Minimize methods as mentioned in the API guide.

Even for IsMaximised or IsMinimised, it always returned false.

Can you enlighten me or a place where I can enlighten myself why these methods were not working????

I had to get the properties for the button and set the Frame visibility property to false and set the expression.

(Credit to Rakesh)

Can you tell me what these two statements are doing??? (Is frame surrounding the button???) and why are there expressions fur button??

prop.Frame.Show.Always = false
prop.Frame.Show.Expression.v = "1 = 2"

Finally, is there a place where I can know the properties such as these??

Thanks you very much in advance

1 Reply
disqr_rm
Partner - Specialist III
Partner - Specialist III

Why your logic didn't work - not sure as I did not look into details. My style is if something isnt working, find alternatives. 🙂

What these 2 statements are doing:

prop.Frame.Show.Always = false
prop.Frame.Show.Expression.v = "1 = 2"

If you go to properties of a button and under layout tab you will see radiobutton: Show always or Conditional.

The first statement setting Show Always radiobutton to false, which automaically enables conditional show. Then next statement put a condition which can never be true (1=2), so the button is not show.

Under UnHideIt macro, I remove the contion 1=2, so button is visible again.

Hope I explained it correctly. Let me know if any more questions.