This special action allows the setting within Profiler screens of up to sixteen copy items from the main file back to the lookup file, each with their own definition of a lookup database, lookup item and from/to copy items.In addition these items can be set to only action when adding, updating or replication a record or to only copy back when the ‘copy back’ item value is changed.
Within the screen design select ‘Parameters’ and then the option ‘Extra File / Record Lookup & Updating’ followed by ‘Custom Points’.
Set the option number ‘9902’ as the custom point, leave the suffix blank and you will then be prompted to change the ‘Write Back to Lookup’ definition – respond ‘Yes’ to this.
Lookup DB – here you set the Profiler file number of the file you want to copy back to. This file must be defined within the Data File Profiles of the application as a lookup from the file number the screen is based upon.
Lookup Item – here you set the data item number that is the lookup code on the main file.
Copy From – here you select the item on the main file that you want to be copied back to the lookup file.
Copy To – here you select the item on the lookup file that is being updated from the main file.
If Add – if set then the copy item is actioned whenever a record is added to the main file.
If Upd – if set then the copy item is actioned whenever a record is updated on the main file.
If Rep – if set then the copy item is actioned whenever a record is replicated on the main file. Copy items are actioned after update of the replicated record.
Condition – within the Application Profile you can define up to fifteen test conditions per file.This prompt asks for the condition number to apply to this copy item. If the condition is true the copy is actioned.
Warn – if set then when the copy ‘from’ item is different from the value of the copy ‘to’ item the system will warn the values are different and ask for OK to proceed with copy.
Only Write Back if copy back value changes – if set then the copy items are only actioned when the value in the ‘copy from’ item is changed.
Article ID: 1253
Created On: Fri, Jun 29, 2012 at 12:02 PM
Last Updated On: Tue, Jun 20, 2023 at 5:16 PM
Online URL: https://kb.datafile.co.uk/article/copy-items-back-to-lookup-file-9902-1253.html