Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create a tab only with the main subroutines.
How can I call a sub from another tab?
Here is the solution, ordering of tabs is very important:
https://community.qlik.com/t5/QlikView-App-Dev/Calling-a-subroutine-from-the-mainscript/td-p/1177354
Hi @marconim_ ,
To call a subroutine from another tab in the Qlik load script editor, you simply define the subroutine in one tab and call it from any other tab. The script is executed sequentially through all tabs, so subroutines defined in earlier tabs are available to call in later tabs.
Example:
Tab 1 - Subroutine:
UB FormatDate(InputDate)
LET FormattedDate = Date(InputDate, 'DD-MM-YYYY');
TRACE Date formatted: $(FormattedDate);
END SUB;
Tab 2 - Main Script:
CALL FormatDate('2024-03-12');