cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
babyjb123
Frequent Visitor

Extract some words from a sentence in an expression

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'])

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@babyjb123 

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.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

2 REPLIES 2
ScottShearer
Super User
Super User

@babyjb123 

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.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

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!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,270)