diff --git a/d2-tracker/dhis2.angular.services.js b/d2-tracker/dhis2.angular.services.js index 47f75187e..2c9be7a9f 100644 --- a/d2-tracker/dhis2.angular.services.js +++ b/d2-tracker/dhis2.angular.services.js @@ -447,22 +447,48 @@ var d2Services = angular.module('d2Services', ['ngResource']) return { getCode: function(options, key){ if(options){ + // for comparison with the option values, which are always represented as strings + const keyString = String(key); + + // is key a name? for(var i=0; i