Hi All,
I am trying to create a way of logging all changes to values on a form. It works perfectly with changes made via key strokes, however, it does not seem to work when I select lookup values.
Can anyone advise where I might be going wrong.
I have used the Changevalue event and the following code
method changeValue(var eventInfo ValueEvent)
var
oldVal,newVal Anytype
tcArc, TcId TCursor
endVar
TcId.open("riv:__Identity.db"
oldVal = self.Value
newVal = eventInfo.newValue()
if newVal <> oldVal then
if tcArc.open("Track_Log.db" then
tcArc.edit()
tcArc.insertRecord()
tcArc.old_value=self.value
tcArc.new_value=newVal
tcArc.Ref=ref.value
tcArc.Changed_By=tcId.FirstName+ " " +tcId.Surname
endif
endIf
endMethod
Regards
Bystander
I am trying to create a way of logging all changes to values on a form. It works perfectly with changes made via key strokes, however, it does not seem to work when I select lookup values.
Can anyone advise where I might be going wrong.
I have used the Changevalue event and the following code
method changeValue(var eventInfo ValueEvent)
var
oldVal,newVal Anytype
tcArc, TcId TCursor
endVar
TcId.open("riv:__Identity.db"
oldVal = self.Value
newVal = eventInfo.newValue()
if newVal <> oldVal then
if tcArc.open("Track_Log.db" then
tcArc.edit()
tcArc.insertRecord()
tcArc.old_value=self.value
tcArc.new_value=newVal
tcArc.Ref=ref.value
tcArc.Changed_By=tcId.FirstName+ " " +tcId.Surname
endif
endIf
endMethod
Regards
Bystander