LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt user for invalid data

Whenever the string changes (or use update while typing), you could scan it as I64 using a hex format code and reject it if the resulting value is outside the range of  a valid 32bit number. Use an event structure. You could even play with filtering events.

 

This is probably preferred over a U32 control, because you can also add other validation tests. A U32 would turn into FFFFFFFF if you enter too many characters, still valid but unrelated to most of the entered characters. 😉

 

Also note that your [continue] button has incorrect mechanical action.

0 Kudos
Message 21 of 42
(1,569 Views)

MY41047333 is 10 characters.  How do you figure to shoehorn this into a U32?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 22 of 42
(1,564 Views)

I have not gotten a clear definition of the storage limitations.  32-bit (U32) or 32-hexadecimal characters (Array of 4-U32's or 2-U64) or 32-characters (Array of 32-U8's, 16-U16's, 8-U32's, or 4-U64's).  Waiting on the examples to be posted of valid and invalid entries including ones for length.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 23 of 42
(1,560 Views)

@billko wrote:

MY41047333 is 10 characters.  How do you figure to shoehorn this into a U32?


It is getting confusing because too many contributors keep guessing because of lack of information.

 

The only valid number from the OP is 1234ADCF, which fits nicely into a U32. No examples of invalid numbers has been given.

0 Kudos
Message 24 of 42
(1,558 Views)

Hi Minions,

 

Even i have the same doubt, valid entries can be any value for example one of the serial number i came across is 123456GH which has no hex character.

And invalid entry will be w.r.t length of the serial number.

 

 

Aniket

0 Kudos
Message 25 of 42
(1,555 Views)

Invalid entries ex - 1234569abcdefghdavfrghjjkdavdavfgr w.r.t length once converted into hex (32 bit length)

0 Kudos
Message 26 of 42
(1,548 Views)

@aniketjha wrote:

 

Even i have the same doubt, valid entries can be any value for example one of the serial number i came across is 123456GH which has no hex character.

And invalid entry will be w.r.t length of the serial number.

 


OK, but 123456GH will not fit in 32bits. To simply limit the string length, use something like this.

 

 

0 Kudos
Message 27 of 42
(1,546 Views)

Thanks Altenbach,

 

I will try to implement as per your suggestion, and will post the progress.

 

 

Regards

Aniket 

0 Kudos
Message 28 of 42
(1,540 Views)

Also, 123456GH this will fit if it's in a range of string length from 0-32, not necessarily it should be 32 bit length but max 32 bit length. 

0 Kudos
Message 29 of 42
(1,539 Views)

@aniketjha wrote:

Also, 123456GH this will fit if it's in a range of string length from 0-32, not necessarily it should be 32 bit length but max 32 bit length. 


So what you really have is an 8 character limit on your serial number string.  In that case, well, do what I already told you to do with the Event Structure.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 30 of 42
(1,534 Views)