Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a text file with some hardcoded text

Is it possible to create a text file with some message in it such as 'No Data Received' and store it at some location?

When some codition fails then in the else part i want a text file to be created with this message

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi

In else part write this

File:

Load * inline

[

Text

'No Data Received'

];


store File into File.qvd(txt);


Regards

ASHFAQ



View solution in original post

5 Replies
Not applicable
Author

Hi Asma,

yes you can use execute cmd lines to write files to certain locations like that, or out as an email rather than a txt file for example

Anonymous
Not applicable
Author

Yup.  Create a table with an InLine load and store it in txt format, as opposed to qvd format.

ashfaq_haseeb
Champion III
Champion III

Hi

In else part write this

File:

Load * inline

[

Text

'No Data Received'

];


store File into File.qvd(txt);


Regards

ASHFAQ



its_anandrjs

Hi Asma,

Yes it is possible try this code

Tab://Suppose it is table with zero rows

LOAD * Inline

[

Name

];

LET vNoOfRow = NoOfRows('Tab');

If $(vNoOfRow) = 0 Then

Status:

LOAD * Inline

[

No Data Received

];

STORE Status into Status.txt(txt);

ENDIF;

Note:- and in second reload put some values and try to reload you not get any field generated

Regards

Anand

its_anandrjs

Hi Asma,

You can load your table like below script to get the current date and time also

Tab:

LOAD * Inline

[

Name

];

LET vNoOfRow = NoOfRows('Tab');

If $(vNoOfRow) = 0 Then

Status:

LOAD

'No Data Received on '&Now() as Status

AutoGenerate 1;

STORE Status into Status.txt(txt);

ENDIF;



Regards

Anand