Forum Post: Different between Hosted Cloud and Private Cloud v 3.1.3.0 and Gauges

Status
Not open for further replies.
C

cohezive

Guest
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.

Continue reading...
 
Status
Not open for further replies.
Top