Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

rest service sort option

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

leven.steve
Posts: 0
Joined: Sun Mar 04, 2012 4:01 pm

rest service sort option

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

rest service sort option

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

leven.steve
Posts: 0
Joined: Sun Mar 04, 2012 4:01 pm

rest service sort option

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

rest service sort option

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.

leven.steve
Posts: 0
Joined: Sun Mar 04, 2012 4:01 pm

rest service sort option

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?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

rest service sort option

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

leven.steve
Posts: 0
Joined: Sun Mar 04, 2012 4:01 pm

rest service sort option

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?

Return to “Issues”