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: 

password

Solved!
Go to solution

I am creating a password application and so far I have made it work but it will not allow me to have an unlimited amount of user name and passwords how can I make this possible?

 

here is my VI so far

 

thanks,

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 1 of 21
(3,553 Views)
Solution
Accepted by topic author Harold_Timmis

Harold,

 

Replace the AND and the case structure in the OK Button case with an =? comparison.

 

If you change the Search arrays to indicators and move them outside the event structure, you do not need the local variables.  As indicators someone cannot change the values!

 

Are you aware that you can use the Password display mode on the string controls/indicators so the user sees **** as passwords are entered? 

 

Lynn 

Message 2 of 21
(3,536 Views)

What is your limit?  I just added 130 until my finger got tired.

 

 

As a side note, I found some issues which I assume you're going to adress.  But just in case I will list them here.  I can enter a username without a password.  And I can add the same user name more than once.

--
Tim Elsey
Certified LabVIEW Architect
Message 3 of 21
(3,535 Views)
thank you guys for all your suggestions and yes I know about the password on the string controls I just thought for test purposes I would not change the string indecator
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 4 of 21
(3,531 Views)

what if I want to hook this up to a case statment so that when it is false it shows a message box I tried to do this but because they both equaled -1 it was true.......

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 5 of 21
(3,511 Views)

Harold,

 

Test for the -1 before testing for equality.

 

Lynn 

Message 6 of 21
(3,509 Views)

ok cool so here is the password.4 completed:)

 

I think lol

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 7 of 21
(3,474 Views)

Harold,

 

If you get a duplicate entry, it clears the entire array.  Is that what you wanted?

 

1. Do not use the Default if unwired option on the case structure for the arrays.  Wire them straight through.

2. Move the build array into the case where no match was detected.

3. Use local variables to clear the string controls rather than property nodes. This is one of the few appropriate uses for locals.

4. The timeout event case is not used.  It can be removed.

5. Use of a while loop (or in LV 8.6 the conditional stop for loop) for the match will stop the loop as soon as a duplicate is found rather than searching the entire array.  For small arrays it does not make much difference but it could be significant on large arrays.

 

Note: the Searchnames2 array is just to watch what was going on. 

 

Lynn 

Message 8 of 21
(3,427 Views)

yes after further testing i realized that and fixed it I also added a few other thind such as the password must have atleast 6 characters and if you enter in the wrong username and/or password the password application will stop.

 

thank you for the example of your code it works great.

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 9 of 21
(3,425 Views)

I can type any number of spaces and create a user name.  Probably not desirable.

--
Tim Elsey
Certified LabVIEW Architect
Message 10 of 21
(3,419 Views)