0

Convert "Credit Term" to Date plus credit term

Hello.

I have 2 fields.
CREDIT TERM (number field)
DUE (date field)

If I add 30 (or any other value) into the CREDIT TERM field, I want the DUE field to auto-update to 30 days from today.

The script I try to use in the CREDIT TERM field (trigger after update) doesn't work.
How can I get it to add the value of CREDIT TERM to today's date?

let xCogDate := 'Due'
'Due' := date(year(xCogDate),month(xCogDate),day(xCogDate) + 'CREDIT TERM');

Thanks for any help, and I wish you all a prosperous and happy new year.

2 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    You should be able to just do as I’m able to do modify a date field on the trigger after update on a number field:

    Due := Due + 'CREDIT TERM'

    Since Due is already a date field you don’t need to turn it into a date data again.

      • NetSol Co., Ltd.
      • Bernd_Krell
      • 1 yr ago
      • Reported - view

      Fred You saved me more than once already. Thank you so much, it works perfectly.

Content aside

  • Status Answered
  • 1 yr agoLast active
  • 2Replies
  • 40Views
  • 2 Following