Get a Jumpstart with our Sample Apps
Results 1 to 13 of 13

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

  1. #1
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    513

    Default 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)?

    Any help is welcome
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

  2. #2
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    513

    Default 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.
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

  3. #3
    "Certified" Alphaholic
    Real Name
    eric
    Join Date
    Mar 2009
    Location
    Amsterdam
    Posts
    1,271

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

    Quote Originally Posted by cptutrecht View Post
    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

  4. #4
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    513

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

    Perhaps good to know that I use the local storage option in the component (not working with Phonegap).
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

  5. #5
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    3,782

    Default 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.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/

  6. #6
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    513

    Default 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).
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

  7. #7
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,464

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

    Quote Originally Posted by cptutrecht View Post
    Perhaps good to know that I use the local storage option in the component (not working with Phonegap).
    Local storage with PhoneGap does work. Suggest you build a very simple test case and try it.

    BTW: Alpha lets you address SQL-Lite on the device which allows much greater storage than local storage.

  8. #8
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    3,782

    Default 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.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/

  9. #9
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    513

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

    Quote Originally Posted by Peter.Greulich View Post
    Local storage with PhoneGap does work. Suggest you build a very simple test case and try it.

    BTW: Alpha lets you address SQL-Lite on the device which allows much greater storage than local storage.
    Hi Peter, sorry my post was ambiguos: I ment: I am not using Phonegap, so I use local storage (and not the filesystem).
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

  10. #10
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,464

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

    Sorry Ger. I misunderstood.

  11. #11
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    3,782

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

    Local storage? Interesting!
    Sim, Device or SD Card.
    You test for these?
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/

  12. #12
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    513

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

    Quote Originally Posted by Ted Giles View Post
    Local storage? Interesting!
    Sim, Device or SD Card.
    You test for these?
    It is new realm for me too. But I understood that local storage means the storage space in the browsermemory itself.
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

  13. #13
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,464

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

    Quote Originally Posted by cptutrecht View Post
    But I understood that local storage means the storage space in the browsermemory itself.
    That's how I understand it as well.

Similar Threads

  1. OFFLINE: Lookup field value in another UX list control with edit combo box
    By CLaubscher in forum Mobile & Browser Applications
    Replies: 17
    Last Post: 02-21-2017, 10:47 AM
  2. How do I make sure a SET is correctly synchronized with tables
    By michaelklein in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 03-10-2014, 11:49 AM
  3. Undo only filtercheckedRows
    By gaby_h in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 12-15-2012, 06:34 PM
  4. Undo update
    By Cheryl Lemire in forum Alpha Five Version 7
    Replies: 10
    Last Post: 05-09-2006, 10:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •