Skip to content

Commit b240ae6

Browse files
committed
Updates
1 parent c44d2bc commit b240ae6

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

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

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ For a straightforward transformation between elements with the same type in the
200200
For a more complex transformation between elements in the source and target schemas, such as elements that you want to combine or that have different data types, you can use one or more functions to perform tasks for that transformation. The following table lists the available function groups and example functions that you can use:
201201

202202
| Group | Example functions |
203-
|-------|-----------|
203+
|-------|-------------------|
204204
| Collection | Average, Count, Direct Access, Index, Join, Maximum, Minimum, Sum |
205205
| Conversion | To date, To integer, To number, To string |
206206
| Date and time | Add days |
@@ -209,6 +209,10 @@ For a more complex transformation between elements in the source and target sche
209209
| 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 |
210210
| Utility | Copy, Error, Format date-time, Format number |
211211

212+
On the map, the function's label looks like the following example and is color-coded based on the function group. To the function name's left side, a symbol for the function appears. To the function name's right side, a symbol for the function output's data type appears.
213+
214+
![Screenshot showing example function label.](media/create-maps-data-transformation-visual-studio-code/example-function.png)
215+
212216
### Add a function without a mapping relationship
213217

214218
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.
@@ -233,6 +237,7 @@ The example in this section transforms the source element type from String type
233237
> appears on the map, but disconnected from any elements or other functions, for example:
234238
>
235239
> ![Screenshot showing the disconnected function, To date.](media/create-maps-data-transformation-visual-studio-code/disconnected-function-to-date.png)
240+
>
236241
237242
1. Expand the function shape to display the function's details and connection points. To expand the function shape, select inside the shape.
238243

@@ -369,16 +374,34 @@ The example in this section calculates a discount to apply when the purchase qua
369374
* The source schema's **ItemPrice** element to the target schema's **ItemPrice** element
370375
* The source schema's **ItemQuantity** element to the **Greater** function's **Value** field
371376
* The **Greater** function's output to the **If** function's **Condition** field
372-
* The **If** function's output to the target schema's **ItemDiscount** element
373377
* The source schema's **ItemPrice** element to the **Multiply** function's **Multiplicand 0*** field
374378
* The **Multiply** function's output to the **If** function's **Value** field
379+
* The **If** function's output to the target schema's **ItemDiscount** element
380+
381+
> [!NOTE]
382+
>
383+
> In the **If** function, the word **ANY** appears to the right of the function name,
384+
> indicating that you can assign the output value to anything.
385+
386+
1. In the following functions, on the **Properties** tab, specify the following values:
387+
388+
| Function | Input parameter and value |
389+
|----------|---------------------------|
390+
| **Greater** | - **Value** #1: The source element named **ItemQuantity** <br>- **Value** #2: **20** |
391+
| **Multiply** | - **Multiplicand** #1: The source element named **ItemPrice** <br>- **Multiplicand** #2: **.10** |
392+
| **If** | - **Condition**: **is-greater-than(ItemQuantity,20) <br>- **Value**: **multiply(ItemPrice, .10) |
393+
394+
The following maps shows the finished example:
375395

376396
![Screenshot showing finished condition example.](media/create-maps-data-transformation-visual-studio-code/if-condition-example-complete.png)
377397

398+
The code view window reflects the mapping relationship that you created:
399+
400+
![Screenshot showing code view with conditional mapping between source and target elements using the functions, Greater, If, and Multiply.](media/create-maps-data-transformation-visual-studio-code/if-condition-example-code-view.png)
378401

379402
## Save your map
380403

381-
On the map toolbar, select **Save**.
404+
When you're done, on the map toolbar, select **Save**.
382405

383406
Visual Studio Code saves your map as the following artifacts:
384407

1.32 KB
Loading
5.85 KB
Loading
-9 Bytes
Loading

0 commit comments

Comments
 (0)