Why does this if statement not work

13 views
Skip to first unread message

kim....@sokiltrucking.com

unread,
Sep 13, 2018, 5:02:13 PM9/13/18
to ParaSQL Support
It's the small things that frustrate me!

What is the syntax for this if statement:

if (BillType.getDataValue() == 'COD')

This is in an event

K

Robert

unread,
Sep 13, 2018, 7:13:08 PM9/13/18
to ParaSQL Support
It is probably a matter of comparing a DataValue object with a String object (a DataValue can hold any type of data value... i.e. a number, date, string, document, etc). Simply call the getString() method on the DataValue object to get its string representation for comparison, like this:

if (BillType.getDataValue().getString() == 'COD')


Reply all
Reply to author
Forward
0 new messages