User-578610739 posted
Hi Nighthawk0712,
Your code is seems perfect ,but while you set a value , you must return in same datatype. If you remember in sqlserver union function like that.
So in your case code is like
StringVar text ;
If isnull({CHARGE_SENTENCE.SENT_END_DATE}) then
text := "Awaiting Trial" ;
Else
text := Totext ({CHARGE_SENTENCE.SENT_END_DATE}); //here proper casting required as you have date, so convert into string by ToText, cstr function
return text;