04-28-2014 06:33 PM
i'm controlling data that enter to a table by using a specific one from them,let's call it "number of the user", when a client has the num 5 and enters his data ;it will be stocked in the 5th row.i want this number 5 to be removed from the list ,so when a new user try to enter num 5 he gets a message"number already used" so he have to enter a different number than 5,for instance 8,consequently i'll get all his data in the 8th row.
if anyone know a little trick to solve this problem
thanks
04-28-2014 06:48 PM
Delete from Array will remove an item.
That or maintain a boolean array that will tell you if a number has been picked before. If element 2 is picked, the check if element 2 of the boolean array is True (already picked). If it is False (not picked), the act on that data and set that boolean element to True.
Wash, Rinse, Repeat.
04-28-2014 11:21 PM - edited 04-28-2014 11:24 PM
04-29-2014 03:10 AM
There is no need to keep track of anything seperately. Simply check if the requested row has already been filled or not.
04-29-2014 10:00 AM - edited 04-29-2014 10:02 AM
adding to others...
04-29-2014 10:24 PM
this number has to be a shared variable,every client is concerned .
"There is no need to keep track of anything seperately. Simply check if the requested row has already been filled or not." i'm not sure if i get your point,because i don't want a new user to even try to fill data in same row,for example 5,the moment he enters 5 in "NR_ORDRE" he gets a message"it's already taken" or use a combo box containing numbers when a client use one it gets deleted for the upcoming client.
04-30-2014 08:29 AM
would it be better if i replace it with a combo box and fill it with numbers from 1 to 100 ,but i'll need something to remove a number from a combo box when it's already used by a client >> unique number for each client
04-30-2014 10:43 AM
Wouldn't it be more useful to instead keep a list of rows that have been used?
04-30-2014 09:44 PM
how to do that Mr altenbach,by the way i posted the vi in my previous post if you need to see what i'm talking about
thanks
05-01-2014 09:42 PM - edited 05-01-2014 09:43 PM