Page 2 of 2

rest service sort option

Posted: Thu Feb 04, 2016 11:49 am
by Serhii Kulibaba

Hello,

It seems like correct. Please remove all extra code. So your JS should be:
prevar requestData = {};
requestData.params = Apperyio.EntityAPI('DB_Rates_query_service.request.query', undefined, true);
requestData.params.sort = "Name";
requestData.params.limit = 200;/pre


rest service sort option

Posted: Thu Feb 04, 2016 1:14 pm
by leven.steve

Are you saying that I should remove the mapping "function" and use your code above? I'm confused. I drag the service call to the editor, and then edited the lines exactly as per your code.

So mine looks like this:
code
var requestData = {};
requestData = (function mapping3415($scope){
var requestData = {};
requestData.params = Apperyio.EntityAPI('RossTrustees_Rates_query_service.request.query', undefined, true);

Code: Select all

 requestData.params.sort = "Name&quot 
 requestData.params.limit = 200; 

 return requestData; 

})($scope);

/code
You can view in shared RossTrustees app if you wish


rest service sort option

Posted: Sat Feb 06, 2016 7:53 pm
by Serhii Kulibaba

If so - you shouldn't remove it. Your previous code didn't contain declaration of the function.

Please share (http://devcenter.appery.io/documentat...) your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue


rest service sort option

Posted: Sun Feb 07, 2016 1:06 pm
by leven.steve

That's because I didnt copy/paste the "function" declaration line. However you can see the "return" line indicating it was a function.

The app is still shared (RossTrustees) with support, login with lucia/lucia
and try Configuration Categories.

It should return 143 rows


rest service sort option

Posted: Sun Feb 07, 2016 5:38 pm
by Serhii Kulibaba

I can't see "limit" parameter on the "RossTrustees_Categories_query_service" service at all.

Also, please delete edited (blue colored) files on Source tab and click Undo all source changes on folder with edited files.

Please note that functionality added via Source tab will be lost and you would need to edit source files again in order to add it back, thus we would recommend that you save project backup before that.

[Here] (http://devcenter.appery.io/tutorials/...) is more information about Source files editing.


rest service sort option

Posted: Sun Feb 07, 2016 5:58 pm
by leven.steve

Thanks Sergiy

I didnt realise that I had to add this as a parameter in the service definition or do you mean in the mapping function code?. The line that was there has now gone - did you delete it?

I think the problem is lack of understanding the documentation. You show things as "curl" commands but not how that translates / is used into the designer. Perhaps some enhancement to the documentation would help here. I think my "sort" parameter to select the index to use just works?

Also, I cannot see any files marked as blue, only the "app" and "pages" nodes of the tree. Which pages/code files are you specifically referring to?


rest service sort option

Posted: Mon Feb 08, 2016 6:37 pm
by Serhii Kulibaba

I've checked your app again and I got 143 items: http://prntscr.com/a0o5u7 I think, it works fine now, am I right?


rest service sort option

Posted: Tue Feb 09, 2016 10:48 am
by leven.steve

Yes Segiy it appears to be returning the correct number of items.
Or at least it now displays in the list all 143 items.

This has happened since your update on the 7th so maybe something got changed/fixed?