Skip to main content

Notifications

Power Automate - Building Flows
Answered

Extract Dollar Amount from String, but skip first fullstop

Posted on by

I have the following snippit from a GMAIL get email activity

 

"This month your services come to $94.07. This amount is due on 21 Sep 2021. Spark logo Account # 123456789 $94.07 to pay by 21 Sep 2021 $94.07 to pay by 21 Sep 2021 Pay Online If you have a direct"

 

I would like to extract the $ amount of the bill. 

I followed some online tutorials, but getting stuck at skipping the first fullstop in the middle of the dollar amount. 

Any ideas please?

  • Re: Extract Dollar Amount from String, but skip first fullstop

    Hi @LukePWilkins :

    Hope this link helps:

    Reference guide to using functions in expressions for Azure Logic Apps and Power Automate 

    Best Regards,
    Bof

  • Re: Extract Dollar Amount from String, but skip first fullstop

    hey there @v-bofeng-msft , that is awesome! How do you learn this stuff? To come up with that formula.

    Thanks for the help, that is ace.

  • Verified answer
    Re: Extract Dollar Amount from String, but skip first fullstop

    Hi @LukePWilkins :

    Please try:

    vbofengmsft_0-1630982103543.png

    The formula:

     

    concat('$',
    if(
    endsWith(split(split(outputs('Compose'),'$')[1],' ')[0],'.'),
    take(split(split(outputs('Compose'),'$')[1],' ')[0],sub(length(split(split(outputs('Compose'),'$')[1],' ')[0]),1)),
    split(split(outputs('Compose'),'$')[1],' ')[0]
    )
    )

    Result:

    vbofengmsft_1-1630982165880.png

     

     

    Best Regards,

    Bof

     

  • Re: Extract Dollar Amount from String, but skip first fullstop

    Thank you for the tip, I see that would work well. 

    I was hoping for a process that used the native functionality of MS Flow, rather than tap into a 3rd party API.

     

    Cheers for posting, it will help other people in the community

  • Re: Extract Dollar Amount from String, but skip first fullstop

    Hi @LukePWilkins :
    Do you want to get the amount in this string

    This month your services come to $94.07. This amount is due on 21 Sep 2021. Spark logo Account # 123456789 $94.07 to pay by 21 Sep 2021 $94.07 to pay by 21 Sep 2021 Pay Online If you have a direct

    If so,I've made a test for your reference:

    vbofengmsft_0-1630909654673.png

    Result:

    vbofengmsft_1-1630909678644.png

    In addition, Plumsail Documents is a fee-based third-party service but you can apply for a one-month free license.

    Best Regards,

    bof

     

  • Re: Extract Dollar Amount from String, but skip first fullstop

    Hi @LukePWilkins :
    Do you want to get the amount in this string

     

    This month your services come to $94.07. This amount is due on 21 Sep 2021. Spark logo Account # 123456789 $94.07 to pay by 21 Sep 2021 $94.07 to pay by 21 Sep 2021 Pay Online If you have a direct

     

    If so,I've made a test for your reference:

    vbofengmsft_0-1630909654673.png

    Result:

    vbofengmsft_1-1630909678644.png

    In addition, Plumsail Documents is a fee-based third-party service but you can apply for a one-month free license.

    Best Regards,

    bof

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard