Rollbase Mobile - Can I change the sort when using a related

Posted by jsniemi79 on 26-Dec-2014 13:44

I have a customer object that has a relationship to notes.  When I used the prebuilt service for the notes view, it sorts with the oldest notes first.  i need to display the notes with the newest at the top, but I don't have any control over this view since it is built automatically by Rollbase when the mobile project is created.  If I have a view I've built, it respects the sorting.

Is this something that I can control in mobile when the data is returned?

All Replies

Posted by Anil Kumar on 27-Dec-2014 00:32
Hi jsniemi79,
 
The data shown in mobile emulator is based on the view available in Rollbase environment. By default the sorting is set to ‘Updated At’ attribute and is pointed to ‘descending’ value. Following is the output in the emulator in the default scenario.
 
 
I have changed the sorting order in Rollbase view and is affected properly in the Mobile emulator as below:
 
 
Case 2: For normal REST services and the database services we can perform the same sorting using sort attribute in the request parameters as below:
 

1.       Add the request attribute by the name sort

 
 

2.       For displaying the records in Ascending Order use the direct field name as the value for the sort attribute

 
 

3.       For displaying the records in descending order add – before the field name as the value for the sort attribute

 
 
 
We can also sort the records with multiple fields with comma separated values for the sort attribute.
 
Hope this helps.
 
Thanks and Regards,
Anil Kumar.
 
[collapse]
From: jsniemi79 [mailto:bounce-jsniemi79@community.progress.com]
Sent: Saturday, December 27, 2014 1:16 AM
To: TU.Mobile@community.progress.com
Subject: [Technical Users - Mobile] Rollbase Mobile - Can I change the sort when using a related object view?
 
Thread created by jsniemi79

I have a customer object that has a relationship to notes.  When I used the prebuilt service for the notes view, it sorts with the oldest notes first.  i need to display the notes with the newest at the top, but I don't have any control over this view since it is built automatically by Rollbase when the mobile project is created.  If I have a view I've built, it respects the sorting.

Is this something that I can control in mobile when the data is returned?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
This thread is closed