LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a table of strings.

Hello all!
I need some help. It is very simple, but has me confused. I want to create a table of strings on my front panel. It has one colmn and many rows. Each row contains a person's name.When I click on a name, I want the selected name, as a single string, at the output of the corresponding block in the block diagram. This name will be attached to a file path and the corresponding file gets opened.

For example. ''C: \ Patient Records\ ''       is one string that is fixed.

I want a table of names on the front panel that I can choose from. On clicking a name, say, ''Hüber'', this string will get appended to the string above to build a path

C:\Patient Records\Hüber

This will open Mr.Hüber's file and display details on my front panel. I have programmed everything else. I'm just stuck on one small thing. I want some way of creating a table of names on the front panel, which on pressing will give me just the selected string. I do not want to use a ring,enum,menu variable or the likes; because my final application will contain over a hundred patient records with  the names on the front panel. And, the doctor who will be using the GUI, must be able to see the list of names before her/him like a table. I tried using a combination box, table, express tale and so on. But, they return arrays of data and not the specific string of the name I want.

    I would like some help and suggestions from all of you,

Aparna.

0 Kudos
Message 1 of 5
(3,171 Views)
Hi!
   I'd use a RING, i which you select User's name, and on selection's change you can build path....

   You can populate the ring at run-time, while the major problem of the ring is that you can't display all names if you doesn't scroll it....

   I hope this helps, if no, please tell me more!

   Have a nice day!

graziano
Message 2 of 5
(3,161 Views)
There are multiple ways to do this, but I would use a listbox (when you say combination box, I assume you mean a listbox).  The ItemNames property will return an array of strings.  If you pass this array into the "Index Array.vi", and send in the value of the combination box as the array index, you will get your selected string.
 
To ensure that only one string gets selected by the user, right-click on the combination box and select "Selection Mode>>1 Item".
 
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
Message 3 of 5
(3,146 Views)
Here's an example created in 8.5.
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 4 of 5
(3,143 Views)
Hi Aparna,

see the attached pic for a solution to your problem. It is quite simple ;). I used the property node to get the list of entries and the index is comming from the listbox element itself. You  only need to connect the output from the index array with a build path VI and you have done it.

Regards Chris


0 Kudos
Message 5 of 5
(3,137 Views)