Skip to content

Commit d170406

Browse files
committed
Updates
1 parent 46b8b7e commit d170406

16 files changed

+55
-24
lines changed

articles/logic-apps/create-maps-data-transformation-visual-studio-code.md

Lines changed: 55 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,16 @@ For a straightforward transformation between elements with the same type in the
181181

182182
![Screenshot showing the data map and a finished mapping between EmployeeID and ID in the source and target schema, respectively.](media/create-maps-data-transformation-visual-studio-code/direct-mapping-complete.png)
183183

184-
The code view window reflects the direct mapping that you created:
184+
The code view window reflects the mapping relationship that you created:
185185

186186
![Screenshot showing code view with direct mapping between EmployeeID and ID in the source and target schema, respectively.](media/create-maps-data-transformation-visual-studio-code/direct-mapping-example-code-view.png)
187187

188+
> [!NOTE]
189+
>
190+
> If you create a mapping between elements where their data types don't match, a warning appears on the target element, for example:
191+
>
192+
> ![Screenshot showing direct mapping between mismatching data types.](media/create-maps-data-transformation-visual-studio-code/data-type-mismatch.png)
193+
188194
<a name="create-complex-mapping"></a>
189195

190196
## Create a complex mapping between elements
@@ -201,63 +207,88 @@ For a more complex transformation between elements in the source and target sche
201207
| String | Code points to string, Concat, Contains, Ends with, Length, Lowercase, Name, Regular expression matches, Regular expression replace, Replace, Starts with, String to code-points, Substring, Substring after, Substring before, Trim, Trim left, Trim right, Uppercase |
202208
| Utility | Copy, Error, Format date-time, Format number |
203209

204-
### Add a function without an existing mapping
210+
### Add a function with a single input
211+
212+
The example in this section transforms the source element type from String type to DateTime type, which matches the target element type. The example uses the **To date** function, which takes a single input.
213+
214+
1. Make sure that map shows the source and target elements that you want.
215+
216+
1. In the map's upper left corner, select **Show functions**.
217+
218+
![Screenshot showing source and target schema elements plus the selected function, Show functions.](media/create-maps-data-transformation-visual-studio-code/no-mapping-show-functions.png)
219+
220+
1. From the functions list that opens, find and select the function that you want to use, which adds the function to the map. If the function doesn't appear visible on the map, try zooming out on the map surface.
221+
222+
This example selects the **To date** function.
223+
224+
![Screenshot showing the selected function named To date.](media/create-maps-data-transformation-visual-studio-code/no-mapping-select-function.png)
225+
226+
> [!NOTE]
227+
>
228+
> If no mapping line exists or is selected when you add a function to the map, the function
229+
> appears on the map, but disconnected from any elements or other functions, for example:
230+
>
231+
> ![Screenshot showing the disconnected function, To date.](media/create-maps-data-transformation-visual-studio-code/disconnected-function-to-date.png)
232+
233+
1. Expand the function shape to display the function's details and connection points. To expand the function shape, select inside the shape.
205234

206235
1. Connect the function to the source and target elements.
207236

208237
1. Drag and draw a line between the source elements and the function's left edge. You can start either from the source elements or from the function.
209238

239+
![Screenshot showing start mapping between source element and function.](media/create-maps-data-transformation-visual-studio-code/function-connect-to-date-start.png)
240+
210241
1. Drag and draw a line between the function's right edge and the target element. You can start either from the target element or from the function.
211242

212-
1. On the function's **Properties** tab, confirm or edit the input to use.
243+
![Screenshot showing finish mapping between function and target element.](media/create-maps-data-transformation-visual-studio-code/function-connect-to-date-end.png)
213244

214-
For some data types, such as arrays, the scope for the transformation might also appear available. This scope is usually the immediate element, such as an array, but in some scenarios, the scope might exist beyond the immediate element.
245+
1. On the function's **Properties** tab, confirm or edit the input to use.
215246

247+
![Screenshot showing Properties tab for the function, To date.](media/create-maps-data-transformation-visual-studio-code/function-connect-to-date-confirm-inputs.png)
216248

217-
### Add a function to an existing mapping
249+
For some data types, such as arrays, the scope for the transformation might also appear available. This scope is usually the immediate element, such as an array, but in some scenarios, the scope might exist beyond the immediate element.
218250

219-
1. [Create a direct mapping between the source and target elements](#create-direct-mapping).
251+
The code view window reflects the mapping relationship that you created:
220252

221-
The created mapping might show an error because the source and target data types don't match. This example transforms the source element value to a DateTime value
253+
![Screenshot showing code view with direct mapping relationship between source and target elements.](media/create-maps-data-transformation-visual-studio-code/to-date-example-code-view.png)
222254

223-
The function now appears connected to the selected mapping relationship.
255+
For example, to iterate through array items, see [Create a loop between arrays](#loop-through-array). To perform a task when an element's value meets a condition, see [Create an if condition between items](#create-if-condition).
224256

225-
> [!NOTE]
226-
>
227-
> If no mapping line is selected when you select a function, the function appears on the map,
228-
> but disconnected from any elements or other functions. To connect the function, you can drag
229-
> and draw connections between the unmapped function and other items.
257+
### Add a function to an existing mapping relationship
230258

231-
1. After the function appears on the map, select the function so that the information window appears.
259+
When a mapping relationship already exists between source and target elements, you can add the function by following these steps:
232260

233-
1. Select the line for the mapping that you created.
261+
1. On the map, select the line for the mapping that you created.
234262

235-
1. Move your pointer over the selected connection, and select **Insert function** when the plus sign (**+**) appears.
263+
1. Move your pointer over the selected line, and select the plus sign (**+**) that appears.
236264

265+
1. From the functions list that opens, find and select the function that you want to use.
237266

238-
For example, to iterate through array items, see [Create a loop between arrays](#loop-through-array). To perform a task when an element's value meets a condition, see [Create an if condition between items](#create-if-condition).
267+
The function appears on the map and is automatically connected between the source and target elements.
239268

240269
### Add a function with multiple inputs
241270

242-
The example in this section concatenates two source elements so that you can map the results to the target element.
271+
The example in this section concatenates multiple source element types so that you can map the results to the target element type. The example uses the **Concat** function, which takes multiple inputs.
243272

244273
1. Make sure that map shows the source and target elements that you want.
245274

246275
1. In the map's upper left corner, select **Show functions**.
247276

248-
![Screenshot showing source and target schema elements and the selected option for Show functions.](media/create-maps-data-transformation-visual-studio-code/show-functions.png)
277+
![Screenshot showing source and target schema elements and the selected function named Show functions.](media/create-maps-data-transformation-visual-studio-code/multi-inputs-show-functions.png)
249278

250279
1. From the functions list that opens, find and select the function that you want to use, which adds the function to the map. If the function doesn't appear visible on the map, try zooming out on the map surface.
251280

281+
This example selects the **Concat** function:
282+
252283
![Screenshot showing the selected function named Concat.](media/create-maps-data-transformation-visual-studio-code/select-function.png)
253284

254285
> [!NOTE]
255286
>
256287
> If no mapping line exists or is selected when you add a function to the map, the function
257-
> appears on the map, but disconnected from any elements or other functions. A red dot appears
258-
> in the function's upper right corner to show that the function isn't correctly configured, for example:
288+
> appears on the map, but disconnected from any elements or other functions. If the function
289+
> requires configuration, a red dot appears in the function's upper right corner, for example:
259290
>
260-
> ![Screenshot showing a disconnected function.](media/create-maps-data-transformation-visual-studio-code/function-disconnected.png)
291+
> ![Screenshot showing the disconnected function, Concat.](media/create-maps-data-transformation-visual-studio-code/disconnected-function-concat.png)
261292
262293
1. Expand the function shape to display the function's details and connection points. To expand the function shape, select inside the shape.
263294

@@ -279,7 +310,7 @@ If your source and target schemas include arrays, you can create a loop mapping
279310

280311
1. On the map, in the target schema area, expand the array and array items.
281312

282-
1. In the source schema area, add the array and items to the map.
313+
1. In the source schema area, add the array source element and array item elements to the map.
283314

284315
1. [Create a direct mapping between the source and target elements](#create-direct-mapping).
285316

@@ -289,7 +320,7 @@ If your source and target schemas include arrays, you can create a loop mapping
289320

290321
![Screenshot showing loop mapping between the Name array items plus the source and target arrays, Employee and Person, respectively.](media/create-maps-data-transformation-visual-studio-code/loop-example-automap-arrays.png)
291322

292-
The code view window reflects the looping relationship that you created:
323+
The code view window reflects the mapping relationship that you created:
293324

294325
![Screenshot showing code view with looping relationship between source and target arrays, Employee and Person, respectively.](media/create-maps-data-transformation-visual-studio-code/loop-example-code-view.png)
295326

6.44 KB
Loading
1.47 KB
Loading
Loading
30.7 KB
Loading
35.5 KB
Loading
35.5 KB
Loading
40.1 KB
Loading

0 commit comments

Comments
 (0)