Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

kevinpintokpa
Contributor II

Subroutines cannot be nested too deep in .qvs files?

I have been encountering this strange problem with QlikView QVS script files and wonder if anyone else has encountered it.

I have a subroutine defined:

SUB A

END SUB

The sub works perfectly when it is directly in the load script of a QVW file.

It also works when it is in a QVS file, QVS1, that is directly included in the load script of a QVW file.

But if I put in a deeper level, QVS2, then I get a script error when I call the subroutine.  At this point, the call chain is like this:

QVW file load script > QVS1 > QVS2 > SUB A

The error is simply: Script Error:  Call Sub A

For the moment, I have worked around this by placing the sub at level QVS1.  The call chain looks like this:

QVW file load script > QVS1 > SUB A

This works just fine.

Any ideas?

1 Reply
MVP & Luminary
MVP & Luminary

Re: Subroutines cannot be nested too deep in .qvs files?

Are you nesting $(include)? That is, the main qvw script has:

$(Include=qvs1.qvs);

and qvs1.qvs contains:

$(Include=qvs2.qvs);

That works ok for me.

Or do you have a sub that calls a sub?

-Rob