Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parsing Data - problems with variables

I have a big text file with configuration data that i need to parse. I can read it into one attribute in a table in QV ( configdata ). I can also then display the contents of this attribute in a text box. I can apply string functions to the text and the results are what I would expect. My issue is that when i try and use these same string functions in the script as i start to parse the data, i get <NULL> as a result (or lack thereof lol).

Here's the script.

LOAD @1:n as configdata
FROM
E:\Projects\Pepsi\configdata\DashboardProperties.cfg
(fix, codepage is 1252, record is 32767 lines, no eof);

let logins = textbetween(configdata,'[Supervisors]','[');
let loginsnum = substringcount(logins,'=');
let teststring = left(configdata, 50);

Here's the readout from debug stepping through script.

teststring <NULL>
configdata <NULL>
logins <NULL>
loginsnum <NULL>

Just want to say again that the above 3 statements work fine in a textbox after the script has run. Runtime, no dice. Any ideas?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Oop. Accidently deleted my peek. All good now...

LOAD @1:n as configdata
FROM
E:\Projects\Pepsi\configdata\DashboardProperties.cfg
(fix, codepage is 1252, record is 32767 lines, no eof);




let condata = peek('configdata',0);
let logins = textbetween(condata,'[Supervisors]','[');
let loginsnum = substringcount(logins,'=');

let teststring = left(condata, 50);

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Oop. Accidently deleted my peek. All good now...

LOAD @1:n as configdata
FROM
E:\Projects\Pepsi\configdata\DashboardProperties.cfg
(fix, codepage is 1252, record is 32767 lines, no eof);




let condata = peek('configdata',0);
let logins = textbetween(condata,'[Supervisors]','[');
let loginsnum = substringcount(logins,'=');

let teststring = left(condata, 50);