NetTalk Central

Author Topic: Detect if there was any changes befor to Save the Form  (Read 2818 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Detect if there was any changes befor to Save the Form
« on: June 04, 2010, 04:33:09 AM »
Hallo,


In a clarion app I have this code before Take Completed to detect if there was any changes.

  ! SALVEAZA data si user
  IF NOT SELF.Primary.Me.EqualBuffer(SELF.Saved)
     MEM:Data_Change = today()
     MEM:Time_Change = CLOCK()    !Save the system time
     MEM:User_change = glo_username
     MEM:Trimestrul_Change = gsQTR(today())
     MEM:Anul_Change = year(today())
     g:DataChanged = 1
  END

What is the equivalent code for Web Server?

Thank you,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Detect if there was any changes befor to Save the Form
« Reply #1 on: June 06, 2010, 10:19:10 PM »
Hi Robert,

There's no direct comparison in the WebServer. Because of the multi-threaded, asyncronous nature of the web - not least the ability for a user to abandon a form without clicking save or cancel - it's not as straight-forward as for a Windows app.

Making a copy of the record before editing commences is something I'm thinking of adding as an option.

Cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Detect if there was any changes befor to Save the Form
« Reply #2 on: June 07, 2010, 03:52:15 AM »
Any workaround for this ?

Thank you,
Robert

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Detect if there was any changes befor to Save the Form
« Reply #3 on: June 07, 2010, 06:30:51 AM »
I use X-Files. It's a quick and easy way to save a record or bunch of records if you have child records and then easy to pull back into a group or queue when you need them. Actually you can't use Queues so I use the In-memory driver.

rjolda

  • Sr. Member
  • ****
  • Posts: 279
    • View Profile
    • Email
Re: Detect if there was any changes befor to Save the Form
« Reply #4 on: June 07, 2010, 12:27:34 PM »
Hi,
What is the persistence of IMM file?  Does it persist as long as the SERVER Exe is running and then die when the SERVER exe is closed?
THanks,
Ron Jolda

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Detect if there was any changes befor to Save the Form
« Reply #5 on: June 07, 2010, 02:36:35 PM »
no it ends with the Thread. That is why I write the record or records to XML and then load it back into the IMD at the validate routine

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Detect if there was any changes befor to Save the Form
« Reply #6 on: June 07, 2010, 03:44:12 PM »
I dont know the max lenght of a Session Variable but you could save the record in one session var and compare with it.
Hope this helps
Alberto
-----------
Regards
Alberto