How to easily detect record changes? 
Author Message
 How to easily detect record changes?

I'm using C55EE ABC templates.  I want to know if there is an easy way to
tell when a user presses the OK button on a standard form, did they change
any of the data.  If the data is changed I'm going to send an email.
However, sometimes they look at the data and press Ok without changing
anything.

Thanks in advance,

Brad Wilcox



Wed, 12 Nov 2003 02:03:53 GMT  
 How to easily detect record changes?
Check my kb for "changed"

--

Steve Parker
[Team Topspeed - Internet Connect]

-------------------------------------------------------------
Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
--------------------------------------------------------------


Quote:
> I'm using C55EE ABC templates.  I want to know if there is an easy way to
> tell when a user presses the OK button on a standard form, did they change
> any of the data.  If the data is changed I'm going to send an email.
> However, sometimes they look at the data and press Ok without changing
> anything.

> Thanks in advance,

> Brad Wilcox




Wed, 12 Nov 2003 02:39:22 GMT  
 How to easily detect record changes?

Quote:

> I'm using C55EE ABC templates.  I want to know if there is an easy way to
> tell when a user presses the OK button on a standard form, did they change
> any of the data.  If the data is changed I'm going to send an email.
> However, sometimes they look at the data and press Ok without changing
> anything.

> Thanks in advance,

> Brad Wilcox


Brad,

Put the following ABC code in the:
ThisWindow-->TakeCompleted embed, before the parent call:

if ~access:YourFile.equalbuffer(self.saved)
   Code to execute if record was changed.
end

...of course substitute YourFile for the actual filename.

I use the following code to date stamp changed records:

if ~access:contacts.equalbuffer(self.saved)
   CON:DateModified = today()
   CON:TimeModified = clock()
   CON:UserModified = upper(GLO:User)
end

The code will execute even if the record was Inserted (because the
record changed from no data to filled data).  I haven't tried it yet,
but to execute the code for only changed data, use:

if self.request = ChangeRecord
   if ~access:contacts.equalbuffer(self.saved)
      Code to execute if record was changed.
   end
end

For legacy apps, putting the record-changed-code in the "Before
writing to disk" legacy embed should work.

Regards,
Ed



Fri, 14 Nov 2003 22:23:10 GMT  
 How to easily detect record changes?
Hello Again,

I've actually done this on some of my handwritten projects to ensure I'm not
sending network traffic that I don't need to.  Especially useful on
client/server packages where I REALLY want to limit information going across
the network.  It's just an idea.

Vernon Jay Godwin
www.kefrendesigns.com



Quote:
> Hello,

> My suggestion...create a variable that will hold the record structure
before
> the user has a chance to change information...

> IE....

> HLD::Record      LIKE(PRE:Record)

> On the press of the Okay button you can then test to see if the assigned
> structure matches the current structure...

> If HLD::Record <> PRE:Record
>     Do stuff.....
> End

> Vernon Jay Godwin
> www.kefrendesigns.com



> > Check my kb for "changed"

> > --

> > Steve Parker
> > [Team Topspeed - Internet Connect]

> > -------------------------------------------------------------
> > Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
> > Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
> > --------------------------------------------------------------



> > > I'm using C55EE ABC templates.  I want to know if there is an easy way
> to
> > > tell when a user presses the OK button on a standard form, did they
> change
> > > any of the data.  If the data is changed I'm going to send an email.
> > > However, sometimes they look at the data and press Ok without changing
> > > anything.

> > > Thanks in advance,

> > > Brad Wilcox




Thu, 13 Nov 2003 04:51:53 GMT  
 How to easily detect record changes?
The History function in ABC does this for you, all you need to do is prime
it.

--

Steve Parker
[Team Topspeed - Internet Connect]

-------------------------------------------------------------
Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
--------------------------------------------------------------



Quote:
> Hello,

> My suggestion...create a variable that will hold the record structure
before
> the user has a chance to change information...

> IE....

> HLD::Record      LIKE(PRE:Record)

> On the press of the Okay button you can then test to see if the assigned
> structure matches the current structure...

> If HLD::Record <> PRE:Record
>     Do stuff.....
> End

> Vernon Jay Godwin
> www.kefrendesigns.com



> > Check my kb for "changed"

> > --

> > Steve Parker
> > [Team Topspeed - Internet Connect]

> > -------------------------------------------------------------
> > Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
> > Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
> > --------------------------------------------------------------



> > > I'm using C55EE ABC templates.  I want to know if there is an easy way
> to
> > > tell when a user presses the OK button on a standard form, did they
> change
> > > any of the data.  If the data is changed I'm going to send an email.
> > > However, sometimes they look at the data and press Ok without changing
> > > anything.

> > > Thanks in advance,

> > > Brad Wilcox




Thu, 13 Nov 2003 07:33:19 GMT  
 How to easily detect record changes?
Hello,

My suggestion...create a variable that will hold the record structure before
the user has a chance to change information...

IE....

HLD::Record      LIKE(PRE:Record)

On the press of the Okay button you can then test to see if the assigned
structure matches the current structure...

If HLD::Record <> PRE:Record
    Do stuff.....
End

Vernon Jay Godwin
www.kefrendesigns.com


Quote:
> Check my kb for "changed"

> --

> Steve Parker
> [Team Topspeed - Internet Connect]

> -------------------------------------------------------------
> Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
> Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
> --------------------------------------------------------------



> > I'm using C55EE ABC templates.  I want to know if there is an easy way
to
> > tell when a user presses the OK button on a standard form, did they
change
> > any of the data.  If the data is changed I'm going to send an email.
> > However, sometimes they look at the data and press Ok without changing
> > anything.

> > Thanks in advance,

> > Brad Wilcox




Thu, 13 Nov 2003 04:50:04 GMT  
 How to easily detect record changes?
I go to the TakeCompleted embed for ThisWindow and put code like

   Case ThisWindow.Request
     of InsertRecord
       ! do something if the record is being inserted new
     of ChangeRecord
       IF Access:FileBeingUpdated.EqualBuffer(SELF.Saved)=False
         ! the record is being changed
       .
   .

   Put this code above the parent call

        Tim

Quote:

> I'm using C55EE ABC templates.  I want to know if there is an easy way to
> tell when a user presses the OK button on a standard form, did they change
> any of the data.  If the data is changed I'm going to send an email.
> However, sometimes they look at the data and press Ok without changing
> anything.

> Thanks in advance,

> Brad Wilcox




Fri, 14 Nov 2003 18:34:55 GMT  
 How to easily detect record changes?
Thanx Steve,

I will have to look at said function.  I've had a working method for that
situation for so long I just never thought to look for an easier method.
ACK!   ;)

Vernon Jay Godwin
www.kefrendesigns.com


Quote:
> The History function in ABC does this for you, all you need to do is prime
> it.

> --

> Steve Parker
> [Team Topspeed - Internet Connect]

> -------------------------------------------------------------
> Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
> Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
> --------------------------------------------------------------



> > Hello,

> > My suggestion...create a variable that will hold the record structure
> before
> > the user has a chance to change information...

> > IE....

> > HLD::Record      LIKE(PRE:Record)

> > On the press of the Okay button you can then test to see if the assigned
> > structure matches the current structure...

> > If HLD::Record <> PRE:Record
> >     Do stuff.....
> > End

> > Vernon Jay Godwin
> > www.kefrendesigns.com



> > > Check my kb for "changed"

> > > --

> > > Steve Parker
> > > [Team Topspeed - Internet Connect]

> > > -------------------------------------------------------------
> > > Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
> > > Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
> > > --------------------------------------------------------------



> > > > I'm using C55EE ABC templates.  I want to know if there is an easy
way
> > to
> > > > tell when a user presses the OK button on a standard form, did they
> > change
> > > > any of the data.  If the data is changed I'm going to send an email.
> > > > However, sometimes they look at the data and press Ok without
changing
> > > > anything.

> > > > Thanks in advance,

> > > > Brad Wilcox




Fri, 14 Nov 2003 21:18:50 GMT  
 How to easily detect record changes?
I think the fact that many of us had a save record or save field
function may have been the reason this was included. See
Dennis Evan's FAQ on the subject.

--

Steve Parker
[Team Topspeed - Internet Connect]

-------------------------------------------------------------
Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
--------------------------------------------------------------



Quote:
> Thanx Steve,

> I will have to look at said function.  I've had a working method for that
> situation for so long I just never thought to look for an easier method.
> ACK!   ;)

> Vernon Jay Godwin
> www.kefrendesigns.com



> > The History function in ABC does this for you, all you need to do is
prime
> > it.

> > --

> > Steve Parker
> > [Team Topspeed - Internet Connect]

> > -------------------------------------------------------------
> > Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
> > Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
> > --------------------------------------------------------------



> > > Hello,

> > > My suggestion...create a variable that will hold the record structure
> > before
> > > the user has a chance to change information...

> > > IE....

> > > HLD::Record      LIKE(PRE:Record)

> > > On the press of the Okay button you can then test to see if the
assigned
> > > structure matches the current structure...

> > > If HLD::Record <> PRE:Record
> > >     Do stuff.....
> > > End

> > > Vernon Jay Godwin
> > > www.kefrendesigns.com



> > > > Check my kb for "changed"

> > > > --

> > > > Steve Parker
> > > > [Team Topspeed - Internet Connect]

> > > > -------------------------------------------------------------
> > > > Knowledge base: www.par2.com/cws/c5launch.dll/faqs/thefaqs.exe.0
> > > > Download center: www.par2.com/cws/c5launch.dll/d7.exe.0
> > > > --------------------------------------------------------------



> > > > > I'm using C55EE ABC templates.  I want to know if there is an easy
> way
> > > to
> > > > > tell when a user presses the OK button on a standard form, did
they
> > > change
> > > > > any of the data.  If the data is changed I'm going to send an
email.
> > > > > However, sometimes they look at the data and press Ok without
> changing
> > > > > anything.

> > > > > Thanks in advance,

> > > > > Brad Wilcox




Fri, 14 Nov 2003 21:57:23 GMT  
 How to easily detect record changes?
Hi Brad,

use the embed point Local Objects/ Abc Objects/ Window Manager/ Take
Completed/ Parent Call (after):

 if SELF.Primary.Me.EqualBuffer(SELF.Saved)
 !  no changing
 else
 !  the record was changed
 end

Regards

Kai Br?utigam
Nova Systems GmbH & Co. KG
www.novasystems.de

--------------------------------------------------



Quote:
> I'm using C55EE ABC templates.  I want to know if there is an easy way to
> tell when a user presses the OK button on a standard form, did they change
> any of the data.  If the data is changed I'm going to send an email.
> However, sometimes they look at the data and press Ok without changing
> anything.

> Thanks in advance,

> Brad Wilcox




Sat, 15 Nov 2003 18:58:26 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Detecting changed records ????

2. Detecting locked files in REXX easily (OS/2)

3. How To... Easily Change Viewpoints from HTML

4. changing record(after deleting CHANGE button)

5. How to change Record Filter when changing Tab

6. Multiline record - how to detect?

7. how to detect a record has realy chnaged ??

8. Detecting Field change

9. how to detect change in color scheme, unknown events

10. How to detect field content change in the form template

11. Detecting change of size?

12. Can Event Structure Detect Programmatic Change ?

 

 
Powered by phpBB® Forum Software