Skip to main content
Solved

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


AccFernaM
Sidekick (Partner)
Forum|alt.badge.img+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 

Best answer by Lee Pinchbeck

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

View original
Did this topic help you find an answer to your question?

2 replies

Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+24
  • Ultimate Hero
  • 1219 replies
  • Answer
  • October 9, 2020

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


AccFernaM
Sidekick (Partner)
Forum|alt.badge.img+3
  • Author
  • Sidekick (Partner)
  • 7 replies
  • October 9, 2020

Thanks @Lee Pinchbeck,

Good suggestion, we will try this out.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings