Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

How to create array in Qlikview and store values in it using inputbox

Dear all,

How to create arrays in qlikview using input box and store values in variable.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

As in many things in QlikView it depends on the context.

So if you want to assign the vArr[1] variable to v1 with the help of an Action you would write

=vArr[1]      

directly in the Value entry box in the dialog box - no need for enclosing it in quotation marks.

View solution in original post

9 Replies
marcus_sommer

You could use concat() to create a value-list like an array:

vArray:

= concat(distinct Field, ';')

and you could with substringcount() and subfield() read/access the content.

- Marcus

petter
Partner - Champion III
Partner - Champion III

You can also create some pseudo-arrays like this:

2015-09-01 #1.png

The v3 shows the formula to access the value of vArr[2] dynamically by and index which is v2 in this case. This is not a very efficient storage structure and should be use with a limited number of values. Marcus advice will give a much more compact storage whereas my suggestion give something more similar to real arrays in other programming/scripting languages...

vikasmahajan
Author

Suppose vArr[1] = 123    (123) value i want to hold in other variable how we can do the same.

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
marcus_sommer

What do you want to do with this array - what is the aim? Maybe there are other ways.

- Marcus

petter
Partner - Champion III
Partner - Champion III

You could do it like this:

vOtherVar = '$(vArr[1])';

vikasmahajan
Author

please check i am not able to get values in vOtherVar ???

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
petter
Partner - Champion III
Partner - Champion III

As in many things in QlikView it depends on the context.

So if you want to assign the vArr[1] variable to v1 with the help of an Action you would write

=vArr[1]      

directly in the Value entry box in the dialog box - no need for enclosing it in quotation marks.

petter
Partner - Champion III
Partner - Champion III

As always QlikView is case-sensitive when it comes to Field-names and Variable-names.

The expression in the second text box could be simply:

=vARR[1]

without any quotation marks or $-sign expansion. See the attached fixed QVW....

petter
Partner - Champion III
Partner - Champion III

2015-09.02 #1.PNGI discovered something more in your QVW so I updated the application and have attached with the modification.