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 Platform Community / Forums / Power Automate / Check if a string cont...
Power Automate
Answered

Check if a string contains a wildcard phrase

(0) ShareShare
ReportReport
Posted on by 115

HI there

 

I have built a flow interrogating an excel sheet / table.

From a cell containing a large report which is text containing letters, symbols and numbers, I am able to extract data. Each question answer is placed on a row in the spreadsheet. The largest block of text is in one column along the row.

 

I am able to use indexof and substring to extract answers. There is a template that is for the report so the answers should be between known phrases, words and sentences which are part of the template. 

 

For example

The report states

TECHNIQUE: PROSPECTIVE

DOSE: HIGH

 

So I can use indexof to find where "TECHNIQUE:-" ends and where the word "DOSE" starts and take a substring of the bit in between (in this case "PROSPECTIVE") which is what I need to ultimately update a sharepoint list.

 

However, users sometimes do not give single number answers.

 

One of the report headings is 

"HEART RATE:     bpm". Users should enter ONE heart rate value but sometimes put "52-55"

(e.g. HEART RATE: 52-55 bpm)

 

I want one number only.

 

I dont want to have to go through the sheet of 150 or so entries changing the HEART rate values to one or the other or average.

 

Is there a way to get powerautomate to find the xx-yy bpm phrase and then get it to pick either xx or yy to get one number out?

 

I could do it in excel first, extract the data using FIND and MID but that takes time.

 

Heshan

Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,968 Super User 2026 Season 2 on at

    Hi,

     

    Sorry you typed a lot of stuff so I am confused at what you need for sure.

    You said you know how to use Indexof, so you should be able to find the number of the number-number

     

    In which case you would add a Compose action like this.

     

    Assuming you did a Compose action to get the IndexOf (the substring respectively).

    Where if there is a - in the string you find in your IndexOf Compose, it will split it and give you the bottom one, or it just returns back the number from your previous IndexOf compose.

     

    You could also do [1] if you wanted the higher number

    contains(outputofothercompose,'-', split[outputofothercompose][0], outputofothercompose)

     
    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • heshan_pandit Profile Picture
    115 on at

    Seems simple, sometimes when doing this, I dont see the wood from the trees!

     

    It has worked. Thanks

     

     

    Heshan

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard