Hi all,
I’m having trouble setting a calculated text field where i want to insert either a number or a date (itself a calculation) depending on the value in a combobox.
Using the calculation definition:
if (type_test == ‘number’)
{
return number_test;
}
else if (type_test == ‘date’)
{
return utils.dateFormat(c_date, ‘dd-MM-yyyy’);
}
else if (type_test == “installed date”)
{
return utils.dateFormat(installedat_af_any, ‘dd-MM-yyy’);
}
if i use static date field (installed date) as the source this works fine, however trying to use a calculated date field (c_date) it results in no value.
I have attached a test example to demonstrate. if you change the combobox to number you get the number in the yellow calc. field if you change the combobox to ‘installed date’ you get the installed date. if you change it to date you get no result!
Would appreciate anybody helping me out.