Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
petersvendsen
New Contributor II

Can I print the result of a script to the screen

Hi all,

I have a script looking for late approved cases, when I present the result on a chart I get another result then expected.

if(date#([Due date], 'MMM DD, YYYY') < date#([QA Approval date], 'MMM DD, YYYY'), 1, 0) as LateApprovedNC,

How can I print all the "hits" on the screen?

Can I somehow debug and see exactly why it do not comeup with the result I expect?

Thanks

Peter

1 Solution

Accepted Solutions
richard_chilvers
Contributor III

Re: Can I print the result of a script to the screen

Hi

I find it useful to build a table object with all the fields that I'm interested in.

If you make LateApprovedNC a select field, you can see which combination of fields in your table give this field the value of 0 or 1.

HTH

6 Replies
Not applicable

Re: Can I print the result of a script to the screen

Hi Peter,

Do you need count of LateApproved Cases?

If yes, please use set analysis..

richard_chilvers
Contributor III

Re: Can I print the result of a script to the screen

Hi

I find it useful to build a table object with all the fields that I'm interested in.

If you make LateApprovedNC a select field, you can see which combination of fields in your table give this field the value of 0 or 1.

HTH

vardhancse
Valued Contributor II

Re: Can I print the result of a script to the screen

in chart the expression will be based on some dimension of the chart.

So if we use the same expression in the text object result will vary

MVP
MVP

Re: Can I print the result of a script to the screen

Hi,

You can save the table to a csv using the STORE command like below

QVTableName:

LOAD

*

FROM DataSource;

store QlikviewTableName into myfile.txt (txt);

If you are using Table box you may not get the exact records, because it removes the duplicate records.

To display all the rows in Table box use below script, and mandatorily use the RowNum column in your table.

QVTableName:

LOAD

RowNo() AS RowNum,

*

FROM DataSource;

Hope this helps you.

Regards,

Jagan.

petersvendsen
New Contributor II

Re: Can I print the result of a script to the screen

I have changed the script so it can look if the case is late approved and if a revised date have been agreed then this is used as "new" due date"

 

if([Revised due date]='', if(date#([Due date], 'MMM DD, YYYY') < date#([QA Approval date], 'MMM DD, YYYY'), 1, 0), if(date#([Revised due date], 'MMM DD, YYYY') < date#([QA Approval date], 'MMM DD, YYYY'), 1, 0)) as LateApprovedNC,

Below is an example how it should count

Due date            Revised due date     QA Approved date     Outcome

Jan 1, 2015        Jan 30, 2015             Jan 25, 2015              No not count

Jan 1, 2015                                          Jan 25, 2015             Do count

Jan 1, 2015        Jan 30, 2015              Feb 2, 2015              Do count

petersvendsen
New Contributor II

Re: Can I print the result of a script to the screen

Hi Pooja,

Yes I need to count the late cases.

How would the "set analysis" look like, could you show an example and how it is read?

Thanks

Peter

Community Browser