annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

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
Messaggio 1 di 13
4.619Visualizzazioni
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
Messaggio 2 di 13
4.606Visualizzazioni
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
Messaggio 3 di 13
4.604Visualizzazioni
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 Felice

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
Messaggio 4 di 13
4.602Visualizzazioni
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
Messaggio 5 di 13
4.597Visualizzazioni
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
Messaggio 6 di 13
4.591Visualizzazioni

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
Messaggio 7 di 13
4.580Visualizzazioni
Hello Thomas,

I can't find your attached VI.

Markus
0 Kudos
Messaggio 8 di 13
4.559Visualizzazioni
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
Messaggio 9 di 13
4.558Visualizzazioni
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
Messaggio 10 di 13
4.555Visualizzazioni