LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date and Making sure the user inputs all the required fields

Hello all,

 

I'm working on a simple VI in which the user must input the doctor name, his name, his gender. 

However, I'm finding difficulties when it comes to the user inputing his date of birth. Is there a data type control in labview in which he can select his date of birth ?

 

Furthermore, in case the user didn't fill all the information on the pop-up window, I want the program to display a message ("You must fill all the required fields" or something like that

 

Can you help me arrange my program ?

 

Find attached the VI that im working on 

0 Kudos
Message 1 of 6
(1,333 Views)

I do not understand all the logic of hidden buttons and panels that may not be open. Some of that likely will complicate this recommendation.

 

The main while loop should work like a simple state machine. When what is now an exit condition is detected, check the data for validity.  If it is not valid, prompt the user to supply the missing information and do not exit.

 

For the date of birth look at the time stamp control. Change the format to only show the date. Something like "Time unused" and "Custom date format: M/D/Y, 4-digit year."

 

Also, consider using a string for the SSN. Your users will try to enter xxx-xx-xxxx and the numeric control will not accept the dashes. String functions can be used to validate the format, number of characters, and that all characters (except the dashes) are numerals.

 

Lynn

0 Kudos
Message 2 of 6
(1,319 Views)

An alternative way would be to simply make it impossible for the user to move forward until all the inputs have something in them.  In this case, it might not make much of a difference, but the reasoning is that it's usually much easier to prevent the user from doing something wrong in the first place than it is to catch an error from the user later.

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 3 of 6
(1,302 Views)
This is the third thread you've started on the same subject. That is just rude.
0 Kudos
Message 4 of 6
(1,299 Views)

" ...I'm working on my Final Year Project ...."

 

its that time of year again where time counts down to pass the class requirements Smiley Surprised

 

0 Kudos
Message 5 of 6
(1,285 Views)

Duplicate Post

 

Keep the comments to the original.

0 Kudos
Message 6 of 6
(1,277 Views)