Page 2 of 4

Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 1:26 am
by Igor

Hello,

Please share app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell us the steps how can we reproduce this.


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 1:30 am
by Nalini

I've shared everything above....step by step


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 2:47 am
by Igor

There is incorrect mapping on "five0_incident_query_service". All response fields must be in array $ .
http://docs.appery.io/documentation/u...

Next steps should help to fix this:

  • in "five0_incident_query_service" service-"Test" button - "Automatically Create Service Response"
  • Go back to your screen - Data Tab-report_query-response tab.
    Map grade_courtesy field to localStorage variable "grade_courtesy".

Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 3:01 am
by Nalini

I made the changes exactly. Result? no result, looks like never ending processing

Image Image


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 3:03 am
by Nalini

i made the changes exactly. I now see all of the response fields. However, when I enter value of variable 1 and click search, I get never ending processing..


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 3:20 am
by Igor

Is there any JS errors in browser console?
http://docs.appery.io/documentation/d...

Please share app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a it will help us to resolve this issue faster. This doc will show you how to do this: http://docs.appery.io/documentation/s...


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 4:50 am
by Nalini

I just shared it


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 5:35 am
by Igor

Did you share a correct app? There is no "five0_incident_query_service" in "twillioapp".


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 1:26 pm
by Nalini

sorry I shared wrong app. I just shared correct app. Please take a look.


Calculate average from values in database, then show output in UI labels

Posted: Fri Jan 17, 2014 2:46 pm
by Maryna Brodina

Hello! You have error in code. Try this way precodevar val=0;
if(data.length) {
for (var i=0; i<data&#46;length; i++) {
val+=+data&#46;grade_courtesy;
};
val=val&#47;data&#46;length;
}
alert(val);/code/pre