Ajax events validation ...

Hi,

in a form application, I’ve add on ajax event on fields DATETO and DATEFROM:

{DAYS}=sc_date_dif({DATETO}, “yyyy-mm-dd”, {DATEFROM}, “yyyy-mm-dd”);

working well if I change something and press to enter or an other field , but when I change DATETO or DATEFROM and click to SAVE button without doing anything other, DAYS still stay unchanged !!

Thank you for your help
nacyil

Is normal … Change will not take effect until an input field will be left. Possibly an ajax event fieldname -> onChange helps …

Try this,

on field (DATE) with Ajax onchange event (changing an other field, here DAY) and you change the value of DATE and CLIC on SAVE, of course when you clic on SAVE it left the input field (DATE) and change it , but the other (DAY) remain unchanged

For resolving, you need to add the same code in onValidate Event

Best regards
Nacyil

I think that SC team must validate events ajax automaticaly when the user clicked button save or in event onvalidate.

I did a survey and it has many fields ajax. for my works is much and time. for field each ajax validate again in onvalidate event.

Hello,

What kind of ajax event have you set on DATETO?

regards,
Bernhard Bernsmann

Hi,

This is the code in Ajax Events “Dateto” onchange

	{day}=sc_date_dif({dateto}, "yyyy-mm-dd", {datefrom}, "yyyy-mm-dd");

Best regards

Hello,

Issue reported to our bugs team.

regards,
Bernhard Bernsmann

Thanks !!!