What is wrong with the following code in a calc field?
the field bc_lesrooster___lesdag is a dropdown with numbers as values and text as labels
In the form everything is good but in the list it shows ok (dagelijks) when the value is 0 but it shows the values in place of the labels in the other cases...
I found something strange (or maybe not):
when i have the 3 calc buttons off, i have this faulty result but I see it directly in the list (for existing records)
when I have the first calc button (Only calc on save) on, I get the correct result but only after I open each line and save it, otherwise I have nothing in the list.
So with new records I should have no problem, I see it now with a new calc field and some exisiting records. But I find it strange.
Any advice?
Greetings,
Filip
Code:
$test = '{bc_lesrooster___lesdag_raw}';
if ($test == '0') {
$lDag = 'dagelijks';
} else {
$lDag = '{bc_lesrooster___lesdag}';
}
return $lDag;
the field bc_lesrooster___lesdag is a dropdown with numbers as values and text as labels
In the form everything is good but in the list it shows ok (dagelijks) when the value is 0 but it shows the values in place of the labels in the other cases...
I found something strange (or maybe not):
when i have the 3 calc buttons off, i have this faulty result but I see it directly in the list (for existing records)
when I have the first calc button (Only calc on save) on, I get the correct result but only after I open each line and save it, otherwise I have nothing in the list.
So with new records I should have no problem, I see it now with a new calc field and some exisiting records. But I find it strange.
Any advice?
Greetings,
Filip