If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53933 by Jaymer
Mon May 18, 2020 1:08 am
Having trouble in a custom template with a YN field. MSSQL

I will not have any UNDEFINED value. But I want to print something ONLY when True.
Cannot seem to find the correct way to check for this "true" value.

Have tried:
# if( data["yOEMLoanerYN"] == true ) { #
Loaner
# } #

# if( data["yOEMLoanerYN"] === true ) { #
Loaner
# } #

# if( data["yOEMLoanerYN"] == 1 ) { #
Loaner
# } #

# if( data["yOEMLoanerYN"] === 1 ) { #
Loaner
# } #

# if( data["yOEMLoanerYN"] === 'true' ) { #
Loaner
# } #

# if( $(yOEMLoanerYN).data == true ) { #
Loaner
# } #

This will not pass Syntax checker
# if( yOEMLoanerYN.data == true) { #
Loaner
#} #

This correctly works for null vs. not-null.
# if( data["yOEMLoanerYN"]) { #
Loaner
# } #

Who is online

Users browsing this forum: Google [Bot] and 18 guests