Small issue - but worth noting.After a conversion from Hosted Cloud to Private Cloud, the following Gauge formula based on Query that returned an Average resulted in NULL. It worked fine in Hosted Cloud.
var query = "SELECT AVG(Item_Gross_Profit_Percentage) FROM order where Sale_Date <= '" + rbv_api.formatDate(saledate, "YYYY-MM-dd") + "'";
var res = rbv_api.selectQuery(query,1);
if (res.length > 0) {
return res[0][0];
} else {
return 0;
}
For Hosted Cloud, I had to add parseFloat() around the results for the formula to return a decimal value. This is probably the correct functionality - but the fact that the conversion occurred in the Hosted Cloud but not Private Cloud is interesting.
Try selectNumber instead of selectQuery - that will guarantee numerical result.