LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array with user input select box

Solved!
Go to solution

Hi guys, 

 

so I need to add an additional column to my 2D Array, so that the user to could be able to select multiple rows (up to 3).

I read this post https://forums.ni.com/t5/LabVIEW/Create-checkboxes-programmatically/td-p/3732859 which seems simillar to my case. But the difference is that, in this example both the array values and the boolean values are defined through the code. In my case however the array values are read from a data base, but the boolean values should come from the user, and also the numer of rows varries from case to case. A simplified example is attached.

 

0 Kudos
Message 1 of 8
(2,318 Views)

Try Something Like this.

 

You can have Array cluster of Selection and 1D array of Numeric.

 

PalanivelThiruvenkadam_0-1661245129241.png

 

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 8
(2,293 Views)

I have tried this solution too. But then I wont be able to pass the user input to the booleans. The booleans in this case will be predefined. This is just how it was explained in that link I sent. Two things should be seperated.

1. Array values are read from DB.

2. Selections are given by the user. 

This way either both are predefined (i.e. displayed as Indicators) or filled by the user (displayed as constants).

 

 

0 Kudos
Message 3 of 8
(2,278 Views)

Update:

I built the array. The question is how can I make the booleans (initially defined as false) selectable? I have a vague thoughts and would appreciate if anyone can help me further. I assume I would need to use a combination of case and/or event structure so that: A. The Array cluster gets created on the first run, with all booleans set to False. B. Then switchihg to Idle mode. C. In the Idle mode, the booleans could turn to selectable (True/False). 

Any one has any comment? 

Capture.PNG

 

 

 

0 Kudos
Message 4 of 8
(2,252 Views)

First, change the whole array to a control (it is currently an indicator). Then, highlight one of the subarrays and right click > Advanced > Enabled State > Disabled. Similarly, you can also create a property node for Disabled. Since you seem to want to enable or disable selection of your Booleans depending on program state, you'll need to do that for them.

Spoiler
FireFistRedhawk_0-1661259364532.png
Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 5 of 8
(2,245 Views)

How is it possible to dump cluster data into this array after it s been changed to an indicator?

 

Capture.PNG

 

0 Kudos
Message 6 of 8
(2,233 Views)
Solution
Accepted by topic author Hasamon

I'm guessing you want something like this

"If you weren't supposed to push it, it wouldn't be a button."
Message 7 of 8
(2,232 Views)

Perfect Structure, beautiful appearance. Thanks. 

0 Kudos
Message 8 of 8
(2,224 Views)