Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Run a script on button clicked

I wrote a QlikView macro to perform clean-up, example deleting some redundant rows. I need to have the clean-up very customized, so that i need to have it embedded in a macro.

I would like the user of QLikView server version to be able to run this script anytime. Is it possible to have the script launched on click on a button ? or other user interaction ?

Kind Regards.

6 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

Should be possible, especially if your client is WebView (Ajax).

Then all macros run serverside. All paths in your macro relates to QlikView server machine.

Verify Access rights in your macro dialogue.

hic
Former Employee
Former Employee

No, this is not possible.

First of all, server-side macros are limited since they run in a multi-user environment. Secondly, a user in a server session can never change things that belong to the document, e.g. data, or objects that have been created by the document creator. That would be pulling away the rug from underneath the other users. A user can add and share server objects during a session - and of course also delete his own objects. But he can never change or delete objects that belong to other users or the document itself.

HIC

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Hehe, I read cleaning up files on the server. 🙂 Yes, it is friday..

New start. Can you explain the redundant rows.

Have you tried using Where exists() in your script, could that be a better solution than a macro ?

Not applicable
Author

To be more precise, i would like to run a QLikView script. I can write a few lines to make some 'clean up' in the script, as for instance

CleanUpMap:

mapping load * inline [

x, y

'LTD.', 'LIMITED'

'LTD', 'LIMITED'

];

Clean1:

LOAD Country,

     [Corporate Account],

     [Sal acc]  as [Sales Account],

     MapSubString('CleanUpMap',[Blg acc]) as [Billing Account]

Resident accountInfo;

I reload, and this is working. I would like the user to be able to have this clean-up done on his view of the information. Aim is to avoid user the download into Excel, then the rework of the data.

I tried to add a button action > external > dynamic update, then i copy these lines into the field on the right. But this is not replacing the LTD when i click the button.

Is the problem clearer, and is there a way?

hic
Former Employee
Former Employee

There is no way a normal QlikView user session can run a script.

HIC

sudeepkm
Specialist III
Specialist III

Data Quality is a very important thing in Data Visualization however I would suggest to have any cleaning or any type of data related stuff should be done at the time of loading or aggregating data at the data layer.

And the actual end users who are going to analyze the data through visualization should be kept separated from this process.

We have built a file checker utility which is for those people who upload the data files and specifically for them we have built a logic where they can observe which files have missing fields or columns so that they can rectify it in the next job run.

Are you looking for similar type functionality?