With a date widget, following script in validation rule works fine :
if (parseFloat([[date]])<1429099200)
{alert ("Date must be after April,15th, 2015 included");
id_date.setValue("");
false;}
else{true;}
var my_date = new Date();
var today = Math.round(my_date.getTime()/ 1000);
if(parseFloat([[date]])> today)
{alert("Date can't be in the future !");
id_date.setValue("");
false;}
else{true;}
When the date widget is included into an array, the equivalent script below doesn't react :
if (parseFloat([[my_array.date]][P_index])<1429099200)
{alert ("Date must be after April,15th, 2015 included");
id_my_array.id_date[P_index].setValue("");
false;}
else{true;}
var my_date = new Date();
var today = Math.round(my_date.getTime()/ 1000);
if(parseFloat([[my_array.date]][P_index])> today)
{alert("Date can't be in the future !");
id_my_array.id_date[P_index].setValue("");
false;}
else{true;}
When tested in the JS tester with P_index replaced by 0, it works.
Why is the validation rule of date widget not working in the array ?
Regards
Yves
Yves
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/2cf7ac0d-30aa-46ed-9f3e-5a0b015b5e35%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.