Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 3x5WJGaz4LN76i9VWc7CX+
Power Automate - General Discussion
Answered

Extract some words from a sentence in an expression

Like (0) ShareShare
ReportReport
Posted on 10 Jun 2022 19:38:30 by

HI all,

I want extract some words from a sentence in a dynamic content. I want the red mark part. How can I write a expression?

 

Need help!

Thank you!

 

babyjb123_0-1654889770812.png

 

 

if(contains(body('Get_response_details')?['rfcba5c96bb8449d08e4113dafeefdec6'],'Yes'),
if(contains(body('Get_response_details')?['r48bcc43dcc07476887bc1b1fa1b0d04d'],'All Jobs'),

concat(
'Please add the user to the following AD Groups:',
'</br>',
'</br>G_OP01_DataSets_V
</br>G_OP02_ProjectManagers_V',
'</br>',
body('Get_response_details')?['r2c401034da3c4bc1ab629df00484cd1e']
),

Concat(
'Please add the user to the following AD Groups:',
'</br>',
'</br>',
'G_OP01_DataSets_V',
'</br>',
'</br>G_OP02_ProjectManagers_V',
'</br>',
'</br>Please configure JDE to allow access to the following job(s):',
'</br>',
body('Get_response_details')?['r508fc54d1c704f2bb3e848d80c1a8b7e'],
'</br>',
'</br>',
body('Get_response_details')?['r2c401034da3c4bc1ab629df00484cd1e']
)
)
, concat(
'Please add the user to the following AD Groups:',
'</br>',
'</br>',
body('Get_response_details')?['r2c401034da3c4bc1ab629df00484cd1e'])

  • Community Power Platform Member Profile Picture
    on 10 Jun 2022 at 21:47:04
    Re: Extract some words from a sentence in an expression

    Hi,

    My goal is to extract

     

    G_OP03_Non-OPS Jobs_V

    G_OP04_Labour_V

    G_OP05_Safety_V

     

    from: 

     

    ["OP03 - Non-OPS Jobs - Sample job data for training (G_OP03_Non-OPS Jobs_V)","OP04 - Labour - Labour Rates and more detailed labour reporting (G_OP04_Labour_V)","OP05 - Safety - Detailed safety reporting (G_OP05_Safety_V)"]

     

     

    Do I have to use match expression? 

     

    Thank you!

  • Verified answer
    ScottShearer Profile Picture
    25,218 Most Valuable Professional on 10 Jun 2022 at 19:43:45
    Re: Extract some words from a sentence in an expression

    @Anonymous 

    Is your data coming from Forms?

    Is the data that you want to extract hard-coded into the question?

    Generally speaking, it is easier to use a split() expression.

     

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started