From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to ensure a user completes all fields required before moving to the next case

Can anyone help with this. On my front panel I have 9 string user inputs which must be entered manually. There is a push button which passes these inputs to another VI in the next case structure. When the button is pushed, the VI in the next case opens up. I want to stop the user from accessing the next case unless all fields have benn completed. How do I go about this?
0 Kudos
Message 1 of 8
(2,624 Views)
Check wether the fields have valid input and if not, disable the "Next" button (by wiring 2 into its Disabled property). You can check that the strings are not empty by using the Empty Path\String...? primitive in the comparison palette.

To do this, I would suggest registering the value change event for all the controls and running the validation code whenever one of them changes. That way, the user will only be able to press the button when all the inputs are valid.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 2 of 8
(2,619 Views)
Thank you. The inputs will always be valid as they are a series of drop down menus.
0 Kudos
Message 3 of 8
(2,614 Views)
In this case, add an extra, unused entry in each drop down menus and select it by default through the software. Doing so, it will become very easy to check if all selections have been done by the user. The prize to pay is that all the settings must done again every time the screen is displayed.

Message Edité par JB le 06-08-2007 06:27 PM

0 Kudos
Message 4 of 8
(2,606 Views)

Hi,

Take a look at this example, it's quite a simple way to approach your issue.

Cheers

Tom
NIUK

0 Kudos
Message 5 of 8
(2,560 Views)

Thanks Tom,

Unfortunately I am only running Labview 7.1. Can you save it as a 7.1 and resend please. Thanks again.

0 Kudos
Message 6 of 8
(2,556 Views)
Hi,
 
The example written in LabVIEW 7.1 is attached.
 
Good Luck!
 
Tom
NIUK
0 Kudos
Message 7 of 8
(2,550 Views)

If the inputs are always valid, what's the point of forcing the user to change them? At least some of them could be OK in their current values.

If you still want to do this, I would advise going with JB's method.


___________________
Try to take over the world!
0 Kudos
Message 8 of 8
(2,549 Views)