LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I select string from the table to another table?

Hi everyone.

I build a program, in the program I want to use the choose function.
The material idea is from the table in the Front Panel
I select the string which can appear in another table.

I don't know how can I realize it ?

Thanks in advance.
0 Kudos
Message 1 of 6
(2,975 Views)
Hi,
From what i undestood you have to pick data froma table and push this into another table? am i right.
For this all you have to is create a sub array of the elements which are selected and using the connector pane pass data from one VI to another.
sorry if i am wrong in understanding ,plz post your example code for better understanding.
cheers
vicky
0 Kudos
Message 2 of 6
(2,973 Views)
Hi vicky.

Thanks for your answer.the next is my example.

when the program is running,the "list" in the program can appear the string which

read from the stored file.I want to select the string which I used in the "list",then ,the selected

string can appear in the "list2".the string in the "list" can convert into the selected?

ying.
0 Kudos
Message 3 of 6
(2,963 Views)
Hello shiyan,

some remarks on your vi:
- Why do you use 2 front panel objects with the same name? This is confusing...
- Why do you hide things in the front panel? This is so confusing...
RTFM! (LabView Development Guidelines, Chapter 6)

Your left indicator "list" displays one (1) string. What do you want to select in this ONE string?
If you read a file with more than ONE string (you probably mean more than ONE line) and you want to select one of those lines,
you have to separate the string from file read into those lines. You may use "Read lines from file" instead of "Read characters" or
you may use one of the string functions to break the big (whole file) string into several strings (for example "Match Pattern").
Then you will build an array of strings where the user selects one or more entries.

Hope this helps,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,955 Views)
Hi GerdW
You said:"some remarks on your vi:
- Why do you use 2 front panel objects with the same name? This is confusing...
- Why do you hide things in the front panel? This is so confusing..."

This is I give a example. what I mean is in the "list"object, it can read all the thing from the stored file,

and the "list2" can show the thing which I select from "list". I don't know what I said you can understand ?

For example: the "list" show a lot of telephone numbers, and I want to use one or two numbers from those numbers,

can I point the number which I need,then ,the number can show in the "list2"?

Thanks.

ying
0 Kudos
Message 5 of 6
(2,940 Views)
Hello liying,

it's much easier to select an object when you have an array of objects (or anything else what has a "structure" in it - tables, trees).
But you may use a simple string control as well: there's a property node giving you the position of the selected text (Text.Selection.Start/End).
This way you can also get a user selection from your text.

Hope this helps,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,937 Views)