Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
gandalfgray
Specialist II
Specialist II

msgbox in AjaxZFC client

Has anyone been able to get msgbox to work in an AjaxZFC client?

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Goran,

I've used instead a visible/hide textbox set in a very high layer, so it's always displayed over the objects. Using a button with a simple macro to set one variable (say vVisible) to 1 or 0 and set this textbox to show conditionally based on that variable will do the work.

Macro code for button might look like as follows

Sub ShowText set vis = ActiveDocument.Variables("vVisible") val = vis.GetContent.String if val = 0 then ActiveDocument.GetSheetObject("IDXX").SetLayer 10 vis.SetContent 1, true else ActiveDocument.GetSheetObject("IDXX").SetLayer -10 vis.SetContent 0, true end ifEnd Sub


Although it's not properly a msgbox, it will display any message and it may trigger some otehr actions.

Hope that helps.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello Goran,

I've used instead a visible/hide textbox set in a very high layer, so it's always displayed over the objects. Using a button with a simple macro to set one variable (say vVisible) to 1 or 0 and set this textbox to show conditionally based on that variable will do the work.

Macro code for button might look like as follows

Sub ShowText set vis = ActiveDocument.Variables("vVisible") val = vis.GetContent.String if val = 0 then ActiveDocument.GetSheetObject("IDXX").SetLayer 10 vis.SetContent 1, true else ActiveDocument.GetSheetObject("IDXX").SetLayer -10 vis.SetContent 0, true end ifEnd Sub


Although it's not properly a msgbox, it will display any message and it may trigger some otehr actions.

Hope that helps.

gandalfgray
Specialist II
Specialist II
Author

Thanks Miguel,

I take your answer as a confirmation that the vb function msgbox does not work for ajax.

The code you submitted works as a workaround, (at least for msgboxes without yes/no-buttons)

but I omitted the SetLayer lines and instead placed the IDXX-object at the "Top" level layer, like this:


Sub ShowText
set vis = ActiveDocument.Variables("IDXX")
val = vis.GetContent.String
if val = 0 then
vis.SetContent 1, true
else
vis.SetContent 0, true
end if
End Sub