Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

autogenerate error

Hello,

Can you tell me, please, what am I doing wrong:

load

...

   recno() as numstring

resident Result;

let varRowCount=2*max(numstring);

temp:

load recno() as  row_counter

AutoGenerate(varRowCount);

Regards,

Alexa

1 Solution

Accepted Solutions
Agis-Kalogiannis
Employee
Employee

You need to use the peek function in order to store the numstring into the varRowCount variable.

I am sending you your example slightly modified

TEST:

load

...

   recno() as numstring

resident Result;

maxnumstring_table:

LOAD

  max(numstring) AS maxnumstring

Resident TEST;

let varRowCount= 2 * peek('maxnumstring', 0, 'maxnumstring_table' );

temp:

load recno() as  row_counter

AutoGenerate(varRowCount);

I hope this helps

Regards

Agis

View solution in original post

2 Replies
Agis-Kalogiannis
Employee
Employee

You need to use the peek function in order to store the numstring into the varRowCount variable.

I am sending you your example slightly modified

TEST:

load

...

   recno() as numstring

resident Result;

maxnumstring_table:

LOAD

  max(numstring) AS maxnumstring

Resident TEST;

let varRowCount= 2 * peek('maxnumstring', 0, 'maxnumstring_table' );

temp:

load recno() as  row_counter

AutoGenerate(varRowCount);

I hope this helps

Regards

Agis

Not applicable
Author

Agis Kalogiannis, thanks a lot!