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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

How can i use array in editscrit?

Hi,

I've a qvd file with some  fields(A,B,C,D,E etc) now i'll store this fields in one variable vFields=A,B,C.

In edit script i will return like this.

Table1:

Load $(vFields) from table1.qvd;

-  I want max and min of the fields available in variable.

for eg:

Load

max(A) as MaxA,

min(A) as MinA

Resident Table1;

- But in the place of A, i want provide with Array functionality (i.e Arr)

Arr[]={A,B,C}

For Eg the structure work like this :

for i =0 to 3

Load

Max(Arr) as MaxArr,

Min(Arr) as MinArr

Resident Table1;

next

How can i provide above functionality in editscript?

4 Replies
its_anandrjs
Champion III
Champion III

Hi,

I think you need to use the autogenerate function in qlikview.

Regards

Anand

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

how can i add fields dynamically and find the max & min?

fosuzuki
Partner - Specialist III
Partner - Specialist III

Try this sample:

let f = 'A, B, C';

let n = SubStringCount('$(f)', ',');

for i = 1 to $(n) + 1

  let x = subfield('$(f)', ',', $(i));

   //insert here your load statement

next

Regards,

Fernando

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Thanks Fernando..It's working