MyRapidi
MyRapidi

Search our Wiki

Gathers (many records to one record)

Overview

  • If you need to read the value of a field in more than one record in a sub-table (related table), and then add these values together to one field and put that field in the destination record, then you can use Gather.
  • A typical use of this feature, is when you in the source have a separate comments table where the comments are spread across several lines (records) and in the destination you have one big text field on the main record. For example MS Dynamics NAV stores comments like that - in a related table called comments, and only one lines of text in each record.

 

Setup Gather

  • Select the Transfer where you want to use Gather.
  • From the Transfer you select "Gathers". If a Gather Transfer has already been created you can choose it here or you can create a new.
  • In the "Gather Transfer" window you setup the gather transfer much like a normal transfer, with the exception that you only specify the source side; the destination side is implicitly given as the field(s) are added/updated in the main record.
  • On the Gather transfer you use the "Source Link Filter" to specify the relation between the sub-table and the main source table.
  • The Code of the Gather transfer should start with the same as the main transfer; and then have ending indicating what the Gather transfer is doing. For example a main transfer called "CUST01_FROM_NAV" and a gather transfer called "CUST01_FROM_NAV_COMMENTS". This will ensure that copying the main transfer will work and correctly create a new transfer including any gather transfer(s).
  • In the Field List of a gather transfer you could typically use the formula IMPLODE to put together the values from the different records into one field.