LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric in table

Hello,
I want to use a table in LV which allows only to insert numeric values.
does anyone know a solution

markus
0 Kudos
Message 1 of 13
(3,248 Views)
Hi Markus
 
I think this is what you are looking for.
 
Oops - I just saw that you just want to type in numbers. So you either could use the array as mentioned in the next message or you change the boolean flags in the case structure of my vi, so that just numbers are accepted.
 
Thomas

Message Edited by becktho on 03-21-2006 02:02 PM

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 13
(3,235 Views)
Hi Marcus:

You can build a 2D numeric Array.

If you want to show a table, instead of an array, you can check the values on change event. The user shall insert no-numeric values, but as in the event you have the previous value (with only numeric), you can set that value again

Hope it helps,
Aitortxo.
0 Kudos
Message 3 of 13
(3,233 Views)
Hello Markus,

I think it depends more on your application than on anything else...

Maybe a 2D array would do the job, or image something like a numeric control and a clickable button "add ta table", or maybe a programatic control that would remove any character wich not a number (to do this a match pattern with some "[0-9]" should work...)

Sorry I was just brain storming.... I hope this quick reflection will bright your light !

WOW... when I saw the thread there was no answer... and by the time I finished my post... 2 answer... We have a very reactive community here Smiley Happy

Message Edité par TiTou le 03-21-2006 02:05 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 13
(3,231 Views)
If you want to use a table or listbox, you are going to have to convert the numerics to a string.  Or you can create a "table" using an array, and then you could use numerics.

It is nto hard to convert from a numeric to a string using the different format string vi's.  It is not too hard to implement some error checking either to make sure that the user actually entered a number instead of something else.

Kenny
Kenny

0 Kudos
Message 5 of 13
(3,226 Views)
thanks for this answers,
but I think it won't help me.

In my application there will be a database with different types like numeric,string,... .
So i want to ban wrong characters in the table.
another point is that it is not allowed to write a value two lines after the last line.

i hope anyone has an idea.

markus
0 Kudos
Message 6 of 13
(3,220 Views)

Hi Markus

If you have a look at the vi I attached, you can see that I used filter events (those containing a "?"). Using these, you can check the data in every way you want to and discard the event or accept it.

I think this is the way you should follow.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 13
(3,209 Views)
Hello Thomas,

I can't find your attached VI.

Markus
0 Kudos
Message 8 of 13
(3,188 Views)
Hello Thomas,

if you mean your vi attached before it won't work right.

if i press a character for a second or two the character is filled in.

markus
0 Kudos
Message 9 of 13
(3,187 Views)
Hi Markus
 
As I said - I made it work the wrong way. Characters are accepted and numbers are omitted. But you can get the idea out of it.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 10 of 13
(3,184 Views)