Custom Query template issue with Boolean field

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Custom Query template issue with Boolean field

Post by Jaymer »

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
# } #
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
idpSteve
Posts: 201
Joined: Thu Jul 27, 2017 6:13 am
Location: Johannesburg, South Africa
Contact:

Re: Custom Query template issue with Boolean field

Post by idpSteve »

Hi Jaymer.

Pretty sure its 'Yes' and 'No'.

Let me know!
Post Reply