We developed a simple app in our Rollbase private cloud (Currently Release 3.1.3.0) and installed this in the Pacific cloud for a new customer.. (Yay!)
Problem is that a lot of formula fields for totals and counts are no longer working.
(Many of these totals are for indirectly related objects and requires loops within Loops..)
Eg: Current formula field for displaying a count of outstanding scheduled payments:
var currvehicles = rbv_api.getRelatedIds("R90528", {!id});
var currtot = 0;
for (var k=0; k<currvehicles.length; k++) {
currtot = currtot + Number( rbv_api.selectValue("SELECT count (1) FROM sched_cust_payment where R91199=? and ( ( Actual_Payment_Amount < Expected_Payment_Amount) or Actual_Payment_Amount is null)", currvehicles [k]));
}
return currtot;
The above does not error in our private cloud, but in the Pacific cloud we are getting Errors like:
ERROR: Error Error in SQL Query Select count (1) FROM ....... rb_cust4.count does not exist. Check the 'Function Name Parsing and Resolution' section in the reference manual (line #8) [Field: "Outstanding Customer Payments" ......
(the customers installed pacific database was cust4, hence the rb_cust4)
Questions:
Note: we plan to change rbv_api.getRelatedIds with begin loop, and end loop, but that is not the problem here.
May be related to spaces between count/sum and the following parenthesis???
Still TBC..
We think the difference is that our private cloud is running an Openedge backend, and the Pacific cloud is running a MYSQL backend, and the SQL may be slightly different. - Will confirm later today if removing the space fixes the issues.
May be related to spaces between count/sum and the following parenthesis???
Still TBC..
How about Group Functions?
documentation.progress.com/.../group-functions.html
I'll see if I can dig up a example.
EDIT:
EG:
currtot += #CALC_COUNT.sched_cust_payment( 1 | R91199 == currvehicles[k] && ( ( Actual_Payment_Amount < Expected_Payment_Amount) || Actual_Payment_Amount == 0)))
There may be a typo there - but start with that at least.
D.
You may be right, I may have been going down the wrong path with Group Functions...
We think the difference is that our private cloud is running an Openedge backend, and the Pacific cloud is running a MYSQL backend, and the SQL may be slightly different. - Will confirm later today if removing the space fixes the issues.