Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
i have one macro DispName
Sub DispName
set Name1 = ActiveDocument.Variables("F_date")
set Name2 = ActiveDocument.Variables("T_date")
GetUserName = Name1.GetContent.String
GetUserNam1 = Name2.GetContent.String
if(GetUserName > GetUserNam1) then
msgbox("please select correct dates")
msgbox("TO_DATE must be morethan FROM_DATE ")
end if
End Sub
its workinf fine in developer version
but not working at server(client) side
in macro edit window am selected 'safe mode" and " only safe mode "from drop down
am enabled "Allow unsafe macro execution on server" and "Allow macro execution on server"
still not coming
thanks in advance
I can not help you much with your problem, except telling you a macro never works in QEMC as the QEMC is the abbreviation for the QlikView Enterprise Management Console. If the macro would do something, it is probably doing that on the QVS (QlikView Server) as a result of an action on the QVWS (QlikView Web Server, more known as the Access Point).
But since you are talking about QEMC, you are likely to be running QlikView software that is over 5 years old. QEMC does no longer exist in QlikView 11 (only QMC) and we are now on QlikView 12. I would advise you to check some versions (or naming) and see if it is not time to upgrade to a later version.
A too old version could of course also explain why a certain piece of script does not (yet) work.
The MsgBox function will never work on QlikView Server. VBScript function MsgBox displays a message on your desktop, but the server has no real desktop (all services operate in black-box mode and send their output to clients).
You can try using the QlikView plugin client for IE, that most closely resembles a Desktop environment, to see whether it works with that client.
Check out Chapter 81 - Using Macros in QV Documents on the QV-Server in the QV Desktop Reference Manual, or this link if you are using a recent version of QlikView: Using Macros in QV Documents on the QV-Server ‒ QlikView
Best,
Peter
Hello Hari,
Do you really need macro to achieve that?
You can create much better effect using TextBox with Show Conditional setting.
Solution is to create a variable, which will enable/disable a TextBox.
What more - you can use same variable to configure Calculation Condition / Error Messages in Charts.
(and properly disable such objects as well, when dates are wrong.)
This is how it looks like, when dates are wrong:
Attaching sample app.
BR,
Kuba