M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 26
Registered: ‎05-11-2018
Accepted Solution

Mobile - Slow Sync

Hi,

 

We are having a slow syncing issue upon login from mobile users.

 

The table in questions grows by about 1000 records per week and is currently at 9000 records for the entire table.

 

It feels like the app is syncing with all the records in the table while loggin in. 

 

On occasion it has caused a timeout issue on the device and I fear that this could escalate with the addition of more records.

 

Is there a way to filter before syncing is done? ideally I would like to filter by CURRENT_WEEK (See shell.xaml below)

 

It is important to note that the records are not created by the mobile user. The are predefined and the user only sees the records after syncing.

 

This is an extract of the SHELL.xaml which is causing the issue:

 

</Entity>
		 <Entity Id="PLAYGROUND_ISSUE" Table="PLAY_INSPECTION" Key="ID" SyncType="Automatic" RevisionField="COMPLETE_DATE">
			<Field Name="ID" Type="Guid" IsRequired="True" />
			<Field Name="ITEM_ID" Type="Number" MaxLength="10" />
			<Field Name="PROBLEMS" Type="String" />
			<Field Name="RECOMMENDATIONS" Type="Number" />
			<Field Name="AREA" Type="String" />
			<Field Name="PRIORITY_SCORE" Type="Number" />
			<Field Name="ACTION_BY" Type="Number" />
			<Field Name="COMMENTS" Type="String" />
			<Field Name="USER_RISK_ASSESMENT" Type="String" MaxLength="10"/>
			<Field Name="DATE_OF_INSPECTION" Type="DateTime" />
			<Field Name="PLAYGROUND" Type="Number" MaxLength="10"/>
			<Field Name="INSPECTED_BY" Type="String" />
			<Field Name="REPORTED_TO" Type="String" />
			<Field Name="DATE_FIXED" Type="DateTime" />
			<Field Name="COMPLETE" Type="Number" MaxLength="10"/>
			<Field Name="COMPLETE_DATE" Type="Timestamp" />
			
			<Field Name="IS_ISSUE" Type="Number" />
			<Field Name="EQUIPMENT" Type="String" />
			<Field Name="CURRENT_WEEK" Type="Number" />
			<Field Name="YEAR" Type="Number" />
			<Field Name="CLOSED" Type="Number" />
			
			<Entity.Filters>
				<Filter Id="PLAYGROUND1_FILTER" 
						Sql="PLAYGROUND = @{PLAYGROUND} AND INSPECTED_BY is NULL AND CURRENT_WEEK = (SELECT WEEK FROM PLAY_WEEK WHERE ID =1) AND YEAR = (SELECT YEAR FROM PLAY_WEEK WHERE ID =1)"/>
				<Filter Id="COMPLETE1_FILTER" 
						Sql="PLAYGROUND = @{PLAYGROUND} AND CURRENT_WEEK = (SELECT WEEK FROM PLAY_WEEK WHERE ID =1) AND YEAR = (SELECT YEAR FROM PLAY_WEEK WHERE ID =1) AND INSPECTED_BY is not NULL" 
						IsDefault="False"/>
				<Filter Id="PREVIOUS1_WEEK_FILTER" 
						Sql="PLAYGROUND = @{PLAYGROUND} AND IS_ISSUE = 1" 
						IsDefault="False"/>
				
            </Entity.Filters>
			  
		</Entity>

Thank You

Ciaran

Highlighted
Regular Contributor
Posts: 284
Registered: ‎03-10-2016

Re: Mobile - Slow Sync

Hi Ciaran,

 

in my opinion this is a use case for your database.

I would create a view on your table with a filter on your timestamp.

 

In the shells you should import your data from the view instead of the whole table.

 

Another procedure could be the use of of a filter by area - you are able to predefine it in your shells and your field workers are able to only sync the data in their area.

 

HTH

Stefan

GAUSS Ingenieurtechnik GmbH | Germany
Highlighted
Contributor
Posts: 26
Registered: ‎05-11-2018

Re: Mobile - Slow Sync

Hi Stefan,

 

Apologies for the delay in responding as we were having some issues with mobile connectivity. 

You solution worked perfectly - I used the view option in the database.

 

Thank You

Ciaran