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.

Not applicable

Differing behaviour in script and front end

Hi

I am sure there is a valid explanation why this is happening but as I can't figure it out I am turning to the experts.


I have a table which loads UK bank holidays from the web and then concatenates/comma separates them.  I then move them into a variable as follows:

LET PublicHolidayList = peek('PublicHolidayList');

This is the result:

'01/01/2015', '01/01/2016', '01/05/2017', '02/01/2017', '02/05/2016', '03/04/2015', '04/05/2015', '06/04/2015', '14/04/2017', '17/04/2017', '25/03/2016', '25/05/2015', '25/12/2015', '25/12/2017', '26/12/2016', '26/12/2017', '27/12/2016', '28/03/2016', '28/08/2017', '28/12/2015', '29/05/2017', '29/08/2016', '30/05/2016', '31/08/2015'

In my calendar load I am using this statement:

networkdays(monthstart(Date,0),Date,$(#PublicHolidayList))


If I use the exact same statement in a chart I get different (correct) results.

For January 2016

DateNetWorkDays (script)NetWorkDays (table expr)
01/01/201610
02/01/201610
03/01/201610
04/01/201621
05/01/201632
06/01/201643

etc...


It looks like the script is not 'seeing' a valid date in the last argument of networkdays and assigning it a work day.


What am I missing?


Thanks

Oli



1 Solution

Accepted Solutions
bill_markham
Not applicable

Re: Differing behaviour in script and front end

Why have you got the # ?

networkdays(monthstart(Date,0),Date,$(#PublicHolidayList))

5 Replies
bill_markham
Not applicable

Re: Differing behaviour in script and front end

Why have you got the # ?

networkdays(monthstart(Date,0),Date,$(#PublicHolidayList))

bill_markham
Not applicable

Re: Differing behaviour in script and front end

Also if in your Straight Table you remove the label from an expression and then hover over where the label it should show you the expression with the dollar expansion expanded which makes diagnostics easier.

Not applicable

Re: Differing behaviour in script and front end

Because it's been a long week and I am an idiot! A simple typo but I couldn't see the wood for the tree

Thank you Bill

bill_markham
Not applicable

Re: Differing behaviour in script and front end

Is it working for you now ?

I often go snow blind as well after staring at screen for too long and can no longer see the BLOB, as in the BLindingly OBvious.

Not applicable

Re: Differing behaviour in script and front end

All good now thank Bill