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

Only save to text file in script if data is present

Hi Experts,

I have a script that stores the contents of a table into a text file every hour with the last hours data using a where clause when I load in the data to the table.

store PAYMENT into '\\Data Team\Hourly_Deltas\PAYMENT_DELTA-'$(vDateTime).txt (txt, delimiter is ',');

This works very well, BUT, what I would like to do is to only store the table as a text if there is data there, is there a way to do this?

So, sometimes there is no data and I get a text file with just field headers in it, I only want the text files if there is data as well as field headers.

Thank you for your help, Simon

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Only save to text file in script if data is present

Maybe something like this:

if noofrows('PAYMENT') >= 1 then

     store ....

end if

- Marcus

2 Replies
MVP & Luminary
MVP & Luminary

Re: Only save to text file in script if data is present

Maybe something like this:

if noofrows('PAYMENT') >= 1 then

     store ....

end if

- Marcus

Not applicable

Re: Only save to text file in script if data is present

Thank you very much marcus_sommer