Skip to main content
Nintex Community Menu Bar
Question

javascript to add days to a date

  • July 10, 2024
  • 1 reply
  • 14 views

Forum|alt.badge.img+8

I found a couple of posts on here detailing some javascript to calculate a date by adding days to a starting date and thought I had the javascript down pat but cant get it to work at all. I am using Skuid Platform We have a field called “MostRecentContact”, another number field for the days interval, "ScheduledContactFrequency"and want the result in a date field “NextDue” - none of the fields are UI fields and none are read only. The javascript is below… does anything dramatically wrong jump out at anyone ) var field = arguments[0], $ = skuid.$, value = arguments[1], SourceDate = new Date(field.row.MostRecentContact.substr(0, field.row.MostRecentContact.lastIndexOf(‘.’))), DaysToAdd = skuid.$M(‘Account’).getFirstRow().ScheduledContactFrequency, NextDue = SourceDate + DaysToAdd; field.element.append(NextDue) Any help would be greatly appreciated )

1 reply

Forum|alt.badge.img+8
  • Author
  • Novice
  • 137 replies
  • July 10, 2024

any help would be hugely appreciated )