Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro function call from another qvw file

Hi

Is it possible to call a Macro function written in one qvw file from another qvw load script ?

I created a macro function in one qvw file which prepare and calculate values and write into a file.

Can I call this function from another qvw  load script ?

Thanks

Sajith

4 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi Sajith,

It is not possible to call a macro which is written in another Qlikview file, you need to load or copy and paste the same macro into the current  Qlikview file.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

I am performing some calculation and saving the qvd file from the fist qvw file.  Following are my sequence of operation:

1.qvw file

     load script to load data to tables

     a macro is written which I need to execute after the load , which performes the calculation from the chart  and create the result into a qvd file

Since I am reading the chart , macro can be called only after the load script completion.

2.qvw file

     I am thinking of calling the 1.qvw macro function , so that it create the the qvd file.

if this is not possible, can I execute the macro function in the 1st qvw file after completing the load scrip ?

Thanks

Sajith

jagan
Luminary Alumni
Luminary Alumni

Hi Sajith,

Why can't you use QVD file created in the First Qlikview file in second Qlikview file?  Is data changes in both the files?

It is not possible to call a macro in another qlikview file, you have to create the same function in the same qlikview file and execute the macro as you are doing in the first file.

If the data is same in files 1 and 2 then you can straight away use the QVD in the second Qlikview file.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

After loading the data from 1st qvd files, I am making lot of calculations and the result is saved in a new qvd files.

I am not able to make this calculation in load script since the logic is complicated to do.  

I have two qvd files , one is purchase schedules and another qvd file which is corresponding grn (goods receipts file).   In my scenario , there are one or more than one rows for a specific p.o number in both tables.  I have to calculate fulfillment ratio and delay in delivery days (FIFO basis) by checking each records in both tables. 

Currently , in the 1st qvw file, I am loading both PO and GRN qvd files in to two different tables, and then briging this data in to two different chart (table list).  The Marco function I worte will perform the calculation in which I am reading each records from GRN table and finding out fulfillment ratio and delivery delay days, writing this into a new table and saving the new qvd file.  Since the macro can perform only after the load script, where I am calling the chart values , I can not call this function in the load script.

The reason I am using chart for calculation is, the table read (each rows) taking more time thant reading records from the chart.

I am using publisher to perform the load which is scheduled at night. 

Is there any option to call the marco function after completing the load script.?

Thanks

sajith