Question

Order detail items in mobile application

Dear community,

 

I have generated a custom detail on my mobile app. 

The detail contains a name for the object and other fields: such as a field with the year. 

In the same detail more items can be collected. In the web platform these items can be ordered by the column that I choose: name, year, status, ecc.

In the mobile app these items appear in a random order (they are not sorted alphabetically or by year) and I am not able to set the order rule anywhere. 

 

How can I change the order on which these items appear on the mobile app? 

 

Best regards, 

Clara 

Like 0

Like

4 comments

Dear Clara,
 

Sorting is present only in the out-of-the-box sections and only in the out-of-the-box workplace “Main workplace”. Sorting is implemented at the code level that can be inspected in mobile%sectionname%moduleconf.js file. As for now, any changes to sorting functionality can be done only with development. 

 

I'll inform our R&D team about this issue and suggest they implement it. Thank you for helping us to make our application better!

 

Best regards,
Bogdan

Hi Bogdan,

 

I am trying to order the detail with javascript. I have generated a new module with the following code:

Terrasoft.sdk.RecordPage.setOrderByColumns("VTaDossierFeeDetailEmbeddedDetail", [{
    column: "VTaName",
    orderType: Terrasoft.OrderTypes.DESC
}]);

The "VTaDossierFeeDetailEmbeddedDetail" is my detail in the mobile app regarding the custom object "Entity_Fee" that I want to be ordered by the Name.

 

Then I inserted my code in the "MobileApplicationManifestDefaultWorkplace". First I tried to call the module in the "PageExtensions" of my object "VTaDossier" and after I also tried to call it in the "ModelExtensions" but it didn't work.

On the mobile the record are ordered as they compare in the DB.

 

I tried also to add a similar code to the "Entity_Fee" like this:

Terrasoft.sdk.GridPage.setOrderByColumns("VTaEntity_Fee", [{
    column: "VTaName",
    orderType: Terrasoft.OrderTypes.DESC
}]); 

In this case I wanted to change the order of the object in the Grid Page, but the same the list was not ordered by name. 

 

I wonder if I'm adding it in the wrong place. 

Can you give me some suggestions?

 

Thanks,

Clara

 

 

Clara Fioranzato,

 

The code seems to be correct.

 

The schema with the code should be added to the "PagesExtension". 

 

Also, please try to restart your application after these changes, some 

metadata may have been cached.

 

Best Regards, 

 

Bogdan L.

 

Bogdan,

I am also trying to order the mobile app lists.  This is necessary functionality!

Show all comments