Hey gk,
thx a lot for your plan.
My experience in JS are ZERO...! :-)
I know that I have to bild it up like Basic but I realy need a code because then i can see what happens und how it will build...
THX
BJ
OK, I will help you get there... Let's say you have 3 fields. One for the starting date (called "StartDate"), one for the length of employment (called "Months") and one for the final date of employment (called "EndDate"). You can use this custom calculation script for the latter:
var startDateString = this.getField("StartDate").valueAsString;
var months = Number(this.getField("Months").valueAsString);
if (startDateString=="" || months==0) event.value = "";
else {
var d = util.scand("dd.mm.yyyy", startDateString);
d.setMonth(d.getMonth()+months);
event.value = util.printd("dd.mm.yyyy", d);
}