cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PValette
New Member

Data Mapping via Flow

I would like map values in several attributes, for example

 

0 : Critical

1 : High

2 : Medium

3 : Low

 

From the trigger, I receive this JSON structure

{

   "priority":1

}

and in the flow, I would to transform in

 

{

"priority":"High"

}

 

How I can do this with Flow?

 

Thanks / Philippe

1 REPLY 1
v-yamao-msft
Community Support
Community Support

Hi PValette,

 

You may try to use workflow definition language to replace a string with a given string.


Please check the documentation at here:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language


For a simple test, I use the following function in a Compose action:
if(equals(triggerBody()['text'],'0'),replace(triggerBody()['text'],'0','Critical'),'')


Hope this could be a reference for you.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,684)