Jump to content

how to get the number of row from a table after a data is matched?


Recommended Posts

hi,

I am a beginner in labview. asnd currently doing exercises about table.

I would like to know how to get the number of row to be display at the output after a data is matched from a table.

for example, the table is as below:

Column1 Column 2 Column 3 Column 4 Column 5

Name: Gender: Age: ID number: Hobbies:

Row 1 Sara Female 18 12-23-45 swimming

Row 2 John Male 20 23-45-78 reading

Row 3 Katy Female 55 10-25-99 Rock climbing

Row 4 Alex Male 7 99-27-32 cycling

from the table above, if I want to find a match for the name I key- in, the output should show me the row number that is match with the name I typed. I would like to know how to make this happen?

from the labview, i tried out "match first string" icon to match the name i typed with this table, but I cannot get the number of row of that name I typed. lets say, when i type in the name John, the output would be able to show the number = 2, which is the row number. besides that the info of John would be display also. I would like to know how to make this happen? I had tried, but still cannot get it correct

I had attached a vi file that I had done but imcomplete, because i cannot get the row number correctly.

i hope that there is some one would help me with it by providing or modifying the vi file that is had attech.

thanks a lot for the help.

Download File:post-5026-1148278496.vi

Link to comment
i cannot get the row number correctly.

This is seriously in the wrong forum - you've posted it to "Remote Control, Monitoring and the Internet", and it looks more like homework to me...

Anyway - here's a suggestion: try converting your input string to an array ("Spreadsheet string to array") and then searching the resulting 2 dimensional array...

Link to comment
This is seriously in the wrong forum - you've posted it to "Remote Control, Monitoring and the Internet", and it looks more like homework to me...

Anyway - here's a suggestion: try converting your input string to an array ("Spreadsheet string to array") and then searching the resulting 2 dimensional array...

thanks for the tips.

but my data is already in 2 dimensional array.

I just want to get the row number with matched data. I still couldn't get it.could you help me with it? I would really appreciate it.

the example is like this:

row 1: Sara

row2: John

row3: Alex

row4: Danny

lets say I type in Alex, then the result should be able to show me the row number, which is 3.

I had tried out the "index array", but still cannot get the result. I really hope that you could help me with it. I would be very grateful.

Link to comment
thanks for the tips.

but my data is already in 2 dimensional array.

I just want to get the row number with matched data. I still couldn't get it.could you help me with it? I would really appreciate it.

the example is like this:

row 1: Sara

row2: John

row3: Alex

row4: Danny

lets say I type in Alex, then the result should be able to show me the row number, which is 3.

I had tried out the "index array", but still cannot get the result. I really hope that you could help me with it. I would be very grateful.

See attachments.

Download File:post-549-1148345218.vi

post-549-1148345243.jpg?width=400

Link to comment
I had tried out the "index array", but still cannot get the result.

Index array will select an array element - you want to seach an array. Check out the other primatives on the palette and the LabVIEW help.

See attachments.

Whoa there - the general method of assisting Homework Hustlers is to guide them to the answer with the hustler showing their progress at each step, not just do the assignment for them.

Link to comment
Index array will select an array element - you want to seach an array. Check out the other primatives on the palette and the LabVIEW help.

Whoa there - the general method of assisting Homework Hustlers is to guide them to the answer with the hustler showing their progress at each step, not just do the assignment for them.

You're right, but sometimes its less annoying to give them the answer, especially when a language barrier is in the way. Won't let it happen again.

B

Link to comment
thanks for the tips.

but my data is already in 2 dimensional array.

I just want to get the row number with matched data. I still couldn't get it.could you help me with it? I would really appreciate it.

the example is like this:

row 1: Sara

row2: John

row3: Alex

row4: Danny

lets say I type in Alex, then the result should be able to show me the row number, which is 3.

I had tried out the "index array", but still cannot get the result. I really hope that you could help me with it. I would be very grateful.

really thanks a lot for the help..it really help a lot.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.