I am using the Podio variables and it's returning unexpected results.
var $arr_type = @All of TIME TYPE;
var $arr_duree = @All of DURATION;
var $result = 0;
for (var i = 0; i < $arr_type.length; i++) {
if($arr_type[i] == 'WANTED_TYPE')
$result += $arr_duree[i];
}
$result;
TIME TYPE is a category field. DURATION is a duration field.
How can I return the string of the category? $arr_type[0]
returns 0 and $arr_type[1]
doesn't process.
See screenshot: http://dev.magikweb.ca/hotlink/screeny.png
Thank you for any feedback!
Solution
This is actually a working exemple. I was comparing ouvrable
when it should of been Ouvrable
. The calculation field is VERY limited about debugging.