Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Blogs / Jesús Almaraz blog / Data support generic data u...

Data support generic data upgrader: data transfer Part 2

This post is the follow up of this Data support generic data upgrader: data transfer Part 1 (dynamics.com)
In previous post we saw how to create new rows in a table from another table rows. Now we will see these two use cases:
Use case 2: Copy rows from a table rows to other existing rows.
Use Case 3: Set a value in a single table rows.
Use case 2: Copy rows from a table rows to other existing rows
In  this example we are going to update comment lines created in previous example setting the comment field in Comment Line with post code of customer where customer “No.” is equal to Comment Lines “No.” field.
The steps to get this update are the following:

Step1 Data transfer Header



Search/Data Support Data Transfers. Press New to create a New one, and Set these fields in header:
  • Set a number for data transfer, “MODIFICAR”.
  • An optional description.
  • Table from: source table of the transfer.18=Customer.
  • Table To: 97=Comment Line.
  • Data Action: Copy Fields. That means that we are going to modify existing rows in destination table, “Comment Line”.

Step2 Data transfer fields

In part Data transfer fields we set this transfer of fields:

We are going to set the field “Comment” to “Post Code” of Customer.

Step 3 Set Transfer Join

We set here the fields must match between source and target table to be updated:

We join the rows by No. field.

Step 4 Set the filters in destination table


We can set filters in destination table too. In this part we set the filters of Table Name = constant Customer and Line No. = 69000.
So, we will execute the transfer with Execute button and will get a confirmation with the breakdown of the update:
You will UPDATE in Comment Line the values:
Comment=Customer.Name
WHERE Comment Line.No.= Customer.No.
WHERE Comment Line. Table Name=Customer Comment Line.Line No.=69000 Are you sure?
After execution we get this second confirmation message:
You are going to update 59 records of Lín. comentario. Are you sure?
Use case 3: Set a value in a single table rows
In  this example we are going to update comment lines setting the constant “DAT SUP MIsma Tabla” in comment field, In customer comments (Table Name = Customer) with No. that begins with 1 or 2.
The steps to get this update are the following:

Step1 Data transfer Header



Search/Data Support Data Transfers. Press New to create a New one, and Set these fields in header:
  • Set a number for data transfer, “MISMATABLA”.
  • An optional description.
  • Table from: source table of the transfer.97=Customer.
  • Table To: 97=Comment Line.
  • Data Action: Copy Fields. That means that we are going to modify existing rows in destination table, “Comment Line”.

Step2 Data transfer fields

In part Data transfer fields we set this transfer of fields:

We are going to set the field “Comment” to “DAT SUP Misma Tabla” constant.

Step 3 Set the filters in source table

​​​​​​​
We can set filters in destination table too. In this part we set the filters of Table Name = constant Customer and No. begins by 1 or 2.
So, we will execute the transfer with Execute button and will get a confirmation with the breakdown of the update:
You will UPDATE in Comment Line the values:
Comment=DAT SUP MIsma Tabla
WHERE Comment Line.Table Name=Customer Comment Line
.No.=1*|2* Are you sure?
After execution we get this second confirmation message:
You are going to update 2 records of Lín. comentario. Are you sure?



Comments