0

I have a GeneXus app in Android and I have two kinds of records, complete and incomplete. When I syncronize the app with the server I need to remove the completed records and leave only the incomplete records. How could I do this?

Using Genexus Ev3 U2 Build 87933

Thank you

gcastano
  • 101
  • 1
  • 9

1 Answers1

0

If you have a flag attribute that marks the record as complete or incomplete, you could use it as a filter in the offline database objetc.

Look at this URL:

http://wiki.genexus.com/commwiki/servlet/hwiki?Offline+Database+Object+conditions

PES
  • 168
  • 1
  • 5
  • Hi, I have an attribute that I can use, but I made some tests and when I deleted a record in the client, the deletion is syncronized with the server and the server record is deleted too. How could I only delete the record in the offline database. Besides I understand that conditions are applied to the receive method. The send method applies all the changes in the device to the server records. There is somehting else I'm doing wrong? Thank you. – gcastano Feb 16 '15 at 15:39
  • 1
    @gcastano Only records modified via Business Components are sent to the server. If you wanted to make a "purely local" change, you could use Procedures (e.g. New...EndNew, For Each with updates). This needs to be done carefully, though. – matiash Feb 19 '15 at 21:50
  • Excellent, I'll try this using for each delete inside a procedure. There is some especial considerations using the delete command? Thank you – gcastano Feb 19 '15 at 23:43
  • 1
    @gcastano Only insofar as that the table will become different in the server and the client. This may cause problems with foreign keys, for example. – matiash Feb 21 '15 at 17:51