KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Changing a Boolean into a Text value
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: January 26, 2001
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

To change a Boolean value (True/False) into a text value (for example Adequate/Inadequate) without having to use If, Else and End if, you can use the following line of code:

$0:=(Num($1=True)*"Adequate") + (Num($1=False)*"Inadequate")


The matching variable declarations should be as follows:

C_String (10;$0)
C_Boolean($1)