Showing results for 
Search instead for 
Did you mean: 

if statement without else



my program has a case structure in a while loop to catch the trigger of certain events.

Now I need to query a databse, if a certain number is caught otherwise there shouldn't be any action.

Unfortunately the case-structure says there is an open tunnel for the "false"-case and the Select-thingy alo needs a second value.


Has anybody an idea, how to solve this?


Thanks Tim

0 Kudos
Message 1 of 10
check this vi
0 Kudos
Message 2 of 10

thank you for your fast reply.

Hm, I don't know if this would work the way you showed in the vi. I've changed it, just to get an idea of what my intension was.

Maybe you could take a look at it.



Message Edited by useratni on 06-24-2009 08:39 AM
Message Edited by useratni on 06-24-2009 08:40 AM
0 Kudos
Message 3 of 10

Do you want something different written to the string indicator in the False case, even if it is an empty string?


Or do you want the string indicator to keep the same information as when the case structure was true?


If the first, then you will need to wire something into that tunnel in the false case.  (If an empty string, then you can wire that, or right click on the tunnel and select Use default values if unwired.)


If the second, then move the indicator inside the true case.

0 Kudos
Message 4 of 10


Hi tim,


Can you kindly post the vi for lv 8.0?

0 Kudos
Message 5 of 10

@Ravens Fan:


the thing is, if there is a signal every second, the SQL-Statement for the database changes at the same time, although this isn't necessary. Only if there comes in a number, that is <>254 a SQL query should be started.




sure, check the attachment.


Message Edited by useratni on 06-25-2009 03:40 AM
0 Kudos
Message 6 of 10

Hi Tim,


 What do you want to do when the condition returns false? Just right click the tunnel and choose "default if not wired". But I am not sure if this is what u want

0 Kudos
Message 7 of 10
a little modification
0 Kudos
Message 8 of 10
another way
0 Kudos
Message 9 of 10

I assume the SQL query which you do not have shown will be in the True case of your case structure?  The string is the result from that?


Just move the string indicator inside the case structure like I said.  Have you tried that?

0 Kudos
Message 10 of 10