If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You must register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to undo offline edits to a list that cannot be synchronized

Sometimes because of database constraints offline edits to a list cannot be synchronized.
What would be the best practice to remove specific unsynchronized edits to a list or child list? (without loosing edits to a list that can be synchronized)?

Re: How to undo offline edits to a list that cannot be synchronized

Many reads, no comments...
So it seems I should provide more information.

Setting: Parent List and some child lists are update through formviews and editors. Customers and contacts of customers for example
I would like to allow multiple edits before synchronizing the parent list with the server

One of the possibilities is deleting a record in the parent list. When synchronizing to the server a database constraint can forbid that because the customers have invoice records.
I see that than also the other edits to list are not synchronized to the server.

How can I than remove the delete action from the list, without losing other edits to the list?

I can of course synchronize each and every edit to the list as soon as it happens, but by that you loose the advantage of working disconnected and is far less efficient.

Re: How to undo offline edits to a list that cannot be synchronized

Originally Posted by cptutrecht

Many reads, no comments...
So it seems I should provide more information.

Setting: Parent List and some child lists are update through formviews and editors. Customers and contacts of customers for example
I would like to allow multiple edits before synchronizing the parent list with the server

One of the possibilities is deleting a record in the parent list. When synchronizing to the server a database constraint can forbid that because the customers have invoice records.
I see that than also the other edits to list are not synchronized to the server.

How can I than remove the delete action from the list, without losing other edits to the list?

I can of course synchronize each and every edit to the list as soon as it happens, but by that you loose the advantage of working disconnected and is far less efficient.

First ask Selwyn how data is stored on the [ offline] client by example only memory or client db (slave) like pouchdb perhaps websql or indexeddb then u know more

Re: How to undo offline edits to a list that cannot be synchronized

I don't use AA for Web stuff, strictly Alpha DeskTop, however in the aplication I use, Web and Mobile would have the same update constraints.
So, if you have a restriction under what conditions and when a field can be updated, I would add it to the mobile storage ( like sqlite or similar).
If restrictions are in place, they should probably be Global.

Re: How to undo offline edits to a list that cannot be synchronized

Thanks for your reply, you are right, of course the restrictions are Global.

But I estimate that our application / data is too big to store all data with possible contraints also on the mobile device (without performance issues). Anyway it would make implementing real disconnected operation a lot more complicated than intended by AA I guess.

The 'mobile' part of the application is only a subset of the webapplication (which doesn't need to be working disconnected), but it can encounter most of the constraints.
For CRU operations I don't see problems until now, javacript validation and working with the listcontrol editor can prevent problems. Maybe I should not implement Deletes (but it is a little bit silly not to allow a user deleting an entity which he just created (perhaps by mistake) on the mobile device.

Easy would be to be able, if a contraint prevents updating, to catch that at the client and take appropriate action (in this case just remove that specific edit from the list at the right time).

Re: How to undo offline edits to a list that cannot be synchronized

You might also only allow data which CAN be managed to show on the Mobile Device.
Some records are cast in stone(ish) while on the road, while others - like appointments - are changeable.
If a user enters a data item on the mobile device but does so in error, you are stuffed as you don't know if it really is an error.

In the Health Care sector this problem is evident, so we have "sweeper" programmes to identify inconsistencies and get the user to sort it out when on line.

I admit to being of the opinion that only the most limited processing should go on with mobile devices. Mainly lookups.