
Urgent-Need help with batch update
Hi Ed,
Quote:
> I use C4b-ABC..and am trying to use the process template to copy/update
some
> specified fields in a child file record to the same fields in the parent
> file.
> To be more specific..I need to test if child records exists..if yes then I
> need to test a sequence field in the child records for the value '2'
> Once the correct child record is identified then I need to copy the
contents
> of some fields over to the parent file.
If I correctly understand your task. :)
Assume that in child file you have a key one-component key.
ThisProcess.TakeRecord embed:
1. If you need to test one specific record.
ChildFile:KeyFiled = SomeValue
!init the key field
IF ~Access:ChildFile.TryFetch(Child:SomeKey) !try to
get
IF Child:SomeField = 2
Parent:Record :=: Child:Record
!or asssign filed by field
Access:ParentFile.Update
. .
2. If you need to test the sequence of child records
ChildFile:KeyFiled = SomeValue
SET(Child:SomeKey,Child:SomeKey)
LOOP
IF Access:ChildFile.TryNext THEN BREAK.
IF (ChildFile:KeyFiled <> SomeValue) THEN BREAK.
IF Child:SomeField = 2
Parent:Record :=: Child:Record
!or asssign filed by field
Access:ParentFile.Update
BREAK
. .
Regards,
Anton Novikov