Hi
I used fetchXml to retrieve data from the entity and loop through the data set using JavaScript. However, when I loop through the data, I am getting an empty result (refer to the JAVASCRIPT code below).
Could you advise how i can get each data from the collection?
alert('{{porvinces[i].value}}'); //this line return empty
alert('{{porvinces[0].value}}'); // this line return the right value
<script type="text/javascript">
$("document").ready(function() {
var entitySize="{{provinces.results.entities.size}}";
var i=0;
var entityObj;
for(i=0;i < entitySize;i++ )
{
alert('{{porvinces[0].value}}'); // i get the right value
alert('{{porvinces[i].value}}'); //this line return empty
}
});
</script>