Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bjsellers57
Contributor II
Contributor II

Macro execution

I have an application that runs a Macro ‘Scramble’ encrypting certain fields of confidential data.  The application runs successfully by opening in QlikView and setting the trigger to OnPostReload Run Macro = Scramble.  I set the Security setting in the QVW to allow Macro Override Security.  I just run reload from QlikView and have a successful application pulling data and encrypting the confidential data.

To Run in QEMC

I insure the server security is set to allow both ‘Allow unsafe macro execution on server’ and 'Allow macro execution on server’

I create Supporting Tasks \ External Program to run the application in batch mode with the command line statement:

"F:\Program Files\QlikView\Qv.exe" /r \\ctscolnpqvs1\QvwStaging\ICS_EXTERNAL_DEMO\ICS-Demo-NC.qvw

The application runs and the log file shows completion of the data loading for the application, but then hangs running the macro.

If I use the command line statement "F:\Program Files\QlikView\Distribution Service\QVDistributionService.exe" -r=\\ctscolnpqvs1\QvwStaging\ICS_EXTERNAL_DEMO\ICS-Demo-NC.qvw.

This runs successfully, but does not execute the macro

I know there have been several questions about firing-off macro’s in QEMC with both suggesting the batch command lines I have tried, but I can’t seem to get either of them to working.  Looking for additional suggestions on how to automate running a QlikView application and allowing the Macro’s to be executed

9 Replies
Colin-Albert

This may be a silly question, but if the data is being scrambled, then is there a need to include the data, so can the fields just be removed?

If the data is required to associate tables, then can you use autonumber to convert the values to a different integer?


bjsellers57
Contributor II
Contributor II
Author

Thank you for the quick response Colin

Yes I need to have this data in place, but scrambled

I have three applications with the same frontend so that the reporting structure remains in place (i.e. the main app used be exiting external customers, an external application to demo for existing customers, a new customer application). To keep frontend reporting structure the same I actually pull live data in for two customers, the use some backend encryption and for the bulk of the data created the Scramble macro as it provides a method for scrambling the 50 fields I need to hide the confidential data. This way new customers can view the application, get the look and feel of the real app and the two customer data I pull in remain secure and confidential

Thank you,

Bernie Sellers

Analytical Consultant

(p)410.884.2182

Colin-Albert

Hi Bernie,

Have you seen this thread? Keep data scrambled on reload

rwunderlich‌ suggests using the hash128() function.

bjsellers57
Contributor II
Contributor II
Author

I liked the QlikView Scramble function because it retained more of the look and feel of the data structure for notes, names address and information I wanted to scramble. It seem to make the data more realistic, but yes I could use hash(128), hash(160) or hash(254) as an option for encrypting data in the backend loading.

Bernie Sellers

Analytical Consultant

(p)410.884.2182

Colin-Albert

You could use a keepchar() function around the hash function to convert text data just to text, and numeric data just to numbers, so the sense of the data is retained even though the detail is still scrambled.

keepchar(hash128(number_field), '0123456789')

keepchar(UPPER(hash128(text_field)), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ')


bjsellers57
Contributor II
Contributor II
Author

Good option I will try that and take a look and get my bosses approval, thank

But of course as I investigate and look at other operations that require Marcos I would like to solve have QEMC fire-off the macro

Colin-Albert

Macros are best avoided when using QV Server.

I bow to the superior knowledge and advice of Henric Cronstrom on this topic. Macros are Bad

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If your macro requires System Access (I wasn't sure from your description), add the "NoSecurity" switch to your command line.

F:\Program Files\QlikView\Qv.exe" /r /NoSecurity \\ctscolnpqvs1\QvwStaging\ICS_EXTERNAL_DEMO\ICS-Demo-NC.qvw


-Rob

http://masterssummit.com

http://robwunderlich.com

m_woolf
Master II
Master II

Does your macro quit the QV application?