I just wanted a simple entry in the log.
By now, easier to just remove the "OLD_VALUE" stub.
---------------------------------
I added an entry to a log.
Changed it to show date from ---> date to, which errors at runtime because I can't add a string to a date. makes sense.
Added the AS_STRING around that, which works now UNLESS the date is NULL
Works in testing until the users find an OLD record without a value. Runtime error.
So now I'd have to add a EVAL_EXP to check to see if the OLD_VALUE is null.... etc etc
Code: Select all
JobNote.Note = 'Modular Delivery Date Change: ' + Job.wmDateModularDeliv // works
JobNote.Note = 'Modular Delivery Date Change: ' + OLD_VALUE(Job.wmDateModularDeliv) + ' ----> ' + Job.wmDateModularDeliv // throws "Operands of addition expression are of diff. types"
JobNote.Note = 'Modular Delivery Date Change: ' + AS_STRING(OLD_VALUE(Job.wmDateModularDeliv)) + ' ----> ' + AS_STRING(Job.wmDateModularDeliv) // works
UNLESS THE Date is null. Either the AS_STRING or the OLD_VALUE throws a 'Operation error' dialog.