Different between Hosted Cloud and Private Cloud v a

Posted by cohezive on 09-Mar-2015 10:25

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.

All Replies

Posted by pvorobie on 09-Mar-2015 11:17

Try selectNumber instead of selectQuery - that will guarantee numerical result.

This thread is closed