Solved

Mobile App - Sync BR to filter based on date/time

  • 9 October 2020
  • 2 replies
  • 170 views

Userlevel 2
Badge +3

Hi all community,

I’ve a client that wants to have the completed and canceled jobs in the mobile for the current day. For my understanding the normal behaviour is to remove these ones immediately from the mobile and we have a configuration to set what is the status that we don’t want to see in the mobile device.

Is there a standard way to do this? My idea was to filter this in the sync rule, but I know that there is a limitation on the xml query to use date/time fields.

Thanks, Regards

/Fernando 

icon

Best answer by Lee Pinchbeck 9 October 2020, 12:10

View original

2 replies

Userlevel 7
Badge +24

Hi @AccFernaM,

Just to make sure I have the requirement correct here: You are looking to remove tasks from the device based on the day of creation rather than the current status of the task?

You can get around the date/time limitation by instead using the value of a custom field as a trigger and then have that field default to 1 for instance and have a business rule to set it to 0 the day after completion. The business rules allow for this sort of date/time comparison and the sync rule can then do a simple filter on custom field = 1.

You would also need to amend the sync rule to ensure that the completed and cancelled status are no longer excluded from the sync.

I have not tried this in a working system however so you will need to try this out in a test environment to ensure it works how you would expect.

Kind regards,

Lee Pinchbeck

Userlevel 2
Badge +3

Thanks @Lee Pinchbeck,

Good suggestion, we will try this out.

Reply