Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

macro function in load script

Hi,

I have a macro function that counts the number of charts.
if i call this function in load script with let v_noc = numberofcharts();

Unfortunately I don't get the value. Anyone an idea?


Thanks.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

In general, you can use macro functions in the script, although there could be some restrictions. In your case, I think, the problem is that the charts technically don't exist yet during the the reload. As a workaround, you can create a varaible that keeps the number of charts, and use it in the load script.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

In general, you can use macro functions in the script, although there could be some restrictions. In your case, I think, the problem is that the charts technically don't exist yet during the the reload. As a workaround, you can create a varaible that keeps the number of charts, and use it in the load script.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If your macro is trying to navigate through the ActiveDocument, as of 8.2/8.5 most of the ActiveDocument properties do not exist during script execution. The new "Document Functions" are meant to fill this gap, although I don't see anything for number of charts.

-Rob