07-09-2019 02:03 PM
Hello!
I need to control a case structure using values read from a database. The string values read from the database are either a "yes", "EN", or null. I have been tinkering with this all day with no good results. Thanks for your assistance!
- Nathan
07-09-2019 02:06 PM
Can you please share the VI in which you will be trying for this.
07-09-2019 02:17 PM
Have you tried connecting your string directly to the case structure? Then you make cases for each of your strings. Be sure to put the strings in quotation marks in the case.
07-09-2019 03:17 PM
Hi Nathan
Since you are getting string values from your db, you can have 3 values for your case selector as shown in attached screenshot. Would that not work?
07-09-2019 03:20 PM
Hi Winter!
What would you connect to the question mark that controls the case? - John
07-09-2019 03:22 PM
That would be the string output from your database.
07-09-2019 03:53 PM
Of course you should ensure that the strings are clean and don't e.g. contain a termination character or similar. Maybe pipe it through "trim whitespace" before connecting to the case structure if this is a concern.
07-09-2019 04:53 PM
Also note that there is a difference between a null character (ASCII 0), and an empty string.
07-11-2019 07:28 AM
Also note that you can right-click on the frame and select "Case Insensitive Match".
07-11-2019 07:43 AM
Thanks everyone for the comments! I am working on a VI per your directions provided. As soon as I have it working I will post it. The VI which I will use this for is considered company proprietary and I am unable to share it. More to follow... - John