LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert "True" string to boolean

Solved!
Go to solution

Hi All,

 

I've strings as "True" & "False". I want to convert to boolean so that I can change the value of check box control.

 

Thanks & Regards,

Shrinivas

0 Kudos
Message 1 of 17
(25,795 Views)

Hi Shrini,

 

simply compare for equality with a string constant "TRUE" (maybe do some upper- or lowercase conversion before for easier string handling...)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 17
(25,795 Views)

Hi,

 

Thanks for solution. Can we convert it using TypeCast or by another way?

 

Shrinivas

0 Kudos
Message 3 of 17
(25,793 Views)
You cant use type cast. Type cast will change it to boolean no doubt but not to true and false respectively. Gerdw's solution is simple isnt it?
Message Edited by muks on 08-05-2009 03:09 PM
0 Kudos
Message 4 of 17
(25,787 Views)

Hello,

 

You could do something as simple as a case structure 🙂 This has a case-insensitive option on the right click menu.

 

stringToBoolean.PNG

Message Edited by macaba on 08-05-2009 04:40 AM
Message 5 of 17
(25,785 Views)
tf.PNG
0 Kudos
Message 6 of 17
(25,781 Views)

A rudelberg one.....:smileyvery-happy:

 

rudel.PNG

Message 7 of 17
(25,777 Views)
Haha muks- isn't LabVIEW great; it tempts you to overcomplicate things!!
Message 8 of 17
(25,774 Views)

 


Haha muks- isn't LabVIEW great; it tempts you to overcomplicate things!!

 

 

Absolutely............... :smileyvery-happy:

0 Kudos
Message 9 of 17
(25,770 Views)

another.PNG

 

Lol  :smileyvery-happy:

0 Kudos
Message 10 of 17
(25,760 Views)