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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Expression to Replace ...
Power Automate
Unanswered

Expression to Replace HIGH, LOW or MEDIUM with a number(1, 5, 9 respectively)

(0) ShareShare
ReportReport
Posted on by 55

Expression to Replace HIGH, LOW or MEDIUM with a number(1, 5, 9 respectively)

Sorry for the somewhat newbie question, but I need to do some replacing as the title explains.

I know how to do a compose with:

 

replace(outputs('TaskValue'), 'MEDIUM', '5')

 

Which will output the 5 if the TaskValue is Medium, but what I need is to have it in the same output either of the three values (HIGH, MEDIUM, LOW) converted to 1, 5 or 9, so I can use the output of that compose to fill out a field down the Flow.

 

How can I achieve that? Grateful for any help provided.

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,181 Most Valuable Professional on at
    Re: Expression to Replace HIGH, LOW or MEDIUM with a number(1, 5, 9 respectively)

    Hi @flavioPBadmin,


    Since this is only 3 values, I would go for the easiest option which is a nested replace functions in an expression.

     

     

    replace(replace(replace(outputs('TaskValue'), 'MEDIUM', '5'), 'LOW', '9'), 'HIGH', '1')

     

  • flavioPBadmin Profile Picture
    55 on at
    Re: Expression to Replace HIGH, LOW or MEDIUM with a number(1, 5, 9 respectively)

    Thanks, that works for me!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard