myapp.AddEditTest.Save_execute = function (screen) {
var oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
var StartDate = screen.Test.StartDate;
var EndDate = screen.Test.EndDate;
screen.Days = Math.round(Math.abs((Start.getTime() - End.getTime()) / (oneDay)));
}
screen.Days is the Data Item I have added on the screen which acts like a computed property. running this on a save button updates and displays this value for me.
not a tested solution but based on the HTML Client and how that works, a solution to add a save button that updates a value
tested HTML method:
screen.Days is the Data Item I have added on the screen which acts like a computed property. running this on a save button updates and displays this value for me.