web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Data Mapping via Flow

(0) ShareShare
ReportReport
Posted on by 6

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

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    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

  • Hugo_baltech Profile Picture
    3 on at

    One way to achieve something similar to a hash table in power automate is to use the *Select* data operation and then access it under 'expressions' like so:

    Hugo_baltech_0-1661107473068.png

     

    Hugo_baltech_1-1661107629452.png

    Hugo_baltech_2-1661107660513.png

    Where the 'Body' variable is given as 'body('Select')[0][string(body('Parse_JSON_-_input')?['priority'])]'.

    Running in the following order:

    Hugo_baltech_3-1661107701374.png

     

     

     

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Example:

    2022-08-21_20-01-07.png

    Expression in Compose 2:

    concat(
     if(equals(outputs('compose')['priority'],0), 'Critical', ''),
     if(equals(outputs('compose')['priority'],1), 'High', ''),
     if(equals(outputs('compose')['priority'],2), 'Medium', ''),
     if(equals(outputs('compose')['priority'],3), 'Low', '')
    )

    Blog: tachytelic.net

    YouTube: https://www.youtube.com/c/PaulieM/videos

    If I answered your question, please accept it as a solution 😘

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard