09-09-2018 02:51 PM
Hello Labview Community,
I need help for a part of my VI. In order to execute a case, where a certain VI is to be opened, one has to type in a new username and password, which is saved as a concatenated string, seperated by new lines in a txt. file (see (1) in picture).
Then one can type in a username and password, in order to execute the launch of said VI. The username and password is also turned into a concatenated string.
But to execute the VI, the program should compare the new input of username and password to those exisiting in the txt file (see (2) in picture)
So my problem is basically: How can i compare a singe string input, to every line in txt. file, and then execute the rest of the code?
09-10-2018 12:30 AM
Not able to view your code due to version compatibility, But still i can suggest you to covert the Text File information into array using (Delimited string to array) and then use Search 1D array.
09-10-2018 11:48 AM
@PalanivelThiruvenkadam wrote:
But still i can suggest you to covert the Text File information into array using (Delimited string to array) and then...
No. Just right-click on the Read Text File and there is an option to "Read Lines". Set the number of lines to be -1 (read all) and now you can use the Search 1D Array.
09-10-2018 12:48 PM
@crossrulz wrote:
@PalanivelThiruvenkadam wrote:
But still i can suggest you to covert the Text File information into array using (Delimited string to array) and then...
No. Just right-click on the Read Text File and there is an option to "Read Lines". Set the number of lines to be -1 (read all) and now you can use the Search 1D Array.
Or simply read the enter file as one big text value and use Match Pattern to see if the string exists in the file.