Showing results for 
Search instead for 
Did you mean: 

dynamical show amount of inputs dependen of user input

Go to solution

Hello Together,


following problem:


on one page the user can set the amount of test samples, which is realized within one event loop (within a while loop).

(sorry for not posting the VI as it contains WAY much more code, which is not relevant)


dependent from that number I'd like to show only the respective amount of input lines.





I've realized this by a case structure, but I'd like to have that for up to 20 Inputs, which would result in a rather big case structure.







I'm sure there is a way more elegant solution (?)



LV 2015 Sp1

0 Kudos
Message 1 of 6

Hi WWolf,


instead of using lots of string controls you could use a string array-type (array, table)…

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 6

Hi GerdW,


I thought about the same but gut struck on how to show only part of the array


how do I show only part of the array dependent of the user input?


Best Regards


0 Kudos
Message 3 of 6
Accepted by topic author WWolf78

Arrays have Properties.  The Property "IndexVals" can be used to set the initial Index that appears in the upper left corner of the displayed array (so if you want the first Row, which would be Row Index 0, you would take "1", decrement it, convert it to a 1x1 array using Build Array, and wire it to the IndexVals property), as well as "NumRows", the number of rows you want visible.


Bob Schor

0 Kudos
Message 4 of 6

Hi Bob Schor,


that's why I love this Forum:

as allways: anybody found a good solution 🙂


Thanks for your tip regarding the Property notes, that was the setting I was searching for.


unfortunately I didn't understood your Idea regarding the IndexVals.

Yes, I want every line to have a different label (if that's possible)


here instead of "String 2" on every line, Value 1, Value 2, ...




following Idea don't work:



Any Idea?


0 Kudos
Message 5 of 6

Hi Wolf,


basic rule: in an array ALL elements share the SAME properties!

So all elements will have the same label/caption!



Create an array of cluster. Eacu cluster contains a string (which displays your label) and another string for the user input…

(Hint: you can set this "label" string control to "disabled", so the user cannot change its content.)


The IndexVal property determines which array element is shown as the first visible element. (Example: your array might have 10 elements and you want to show element 2 to 6: IndexVal=2, NumOfRows=5.)

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 6 of 6