Quantcast
Channel: MirrorSync by 360Works Latest Topics
Viewing all articles
Browse latest Browse all 492

Order of synced tables

$
0
0

Sorry for the vague title.

Let's suppose 2 tables

Table Travels (travelID , carID, destinationID)

Table Cars (carid, lastdestination)

What I want is to update the lastdestination field in the table cars each time a travel is deleted.

What I tried is 

1.When a travel is deleted on the phone, I update the car modification time stamp to make sure it gets synced.

2.In the customization script in the "A RECORD WAS UPDATED ON THE HUB" section I added

If Get ( LayoutName ) = "cars" set field [lastdestination, last(travels::destinationid)]

3.I deleted the last travel of a car and synced. The lastdestination field was not updated. I guess that this is because the deletion of the travel record is done after the car record update.

4. If I update the car on the device again and sync...then the field gets updated.

 

Any way to achieve what I want to do ? Can I force the car table to be synced last ?

P.S.

Different users can use the same car. I can not use a calculated field to determine the last position on the device because the other user travels are not on the device.

 

 

 


Viewing all articles
Browse latest Browse all 492

Trending Articles