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 / Get the integer from t...
Power Automate
Answered

Get the integer from the integer and duplicate the integer

(0) ShareShare
ReportReport
Posted on by 164

Hi Everyone,

 

I got two simple questions while creating the Flow:

 

A. I would like to get the integer number from the string, ex:

Input AB1738

Output 1738

I know use skip expression can do it, like this @{skip('AB1738', 2)}, but the design of input is variation by different times, some time input will become A1738, so skip is not suitable for my case, any idea can share?

 

B. The other issue about the duplicate data, I want to duplicate the data for 3 times, ex:

Input: 2019-11-16T01:12:22.5967458Z

Output: 2019-11-16T01:12:22.5967458Z, 2019-11-16T01:12:22.5967458Z, 2019-11-16T01:12:22.5967458Z

Is it possible?

 

Please help on these, thank you.

Regards,

ilu989

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @ilu989 

    If anyone has an easier way to do this then I'm all ears but this is what I've got for you:

     

    I started by entering your test string and then calculating it's length 

    Screenshot 2019-11-17 at 20.28.44.png

    length(outputs('String'))

     Then add the following 3 variables:

    Screenshot 2019-11-17 at 20.30.36.png

     Then add the following 'do-until' of 'counter = outputs('Length')'

    Screenshot 2019-11-17 at 20.32.02.png

     

    substring(outputs('String'),variables('Counter'),1)

    Here's the inner condition:

    Screenshot 2019-11-17 at 20.34.29.png

     

    contains(variables('Numbers'),outputs('SubString'))
    
    outputs('SubString')

    After the 'do until' run an 'apply to each' on the 'Numbers Result Array' and append each number to the 'Final Results String' variable. Then I just used the last compose to display the result:

    Screenshot 2019-11-17 at 20.36.20.png

     

    If you find an easier way of doing this then please let me know but I can't think of one at the moment. 

    For your second question of duplication, you can just add the same variable/dynamic content 3 times.

     

    If I have answered your question then please consider marking this post as a solution and a thumbs up!

     

    Sam

  • Verified answer
    ScottShearer Profile Picture
    25,280 Most Valuable Professional on at

    @ilu989 

    While your question is simple, the answer is not....

    Below is another solution to your issue breaking apart the string and capturing only the integers.  I loop through each element of the string and try to convert it to an integer.  If it fails, I just move on to the next element.  This is facilitated by the run after setting.  The final compose action is just so that you can see the result.

    IntOnly1.jpgIntOnly2.jpgIntOnly3.jpgIntOnly4.jpgIntOnly5.jpgIntOnly6.jpgIntOnly7.jpg

     

     

  • Verified answer
    ScottShearer Profile Picture
    25,280 Most Valuable Professional on at

    @ilu989 

    In answer to your second question regarding the dates/times, you can use the concat() expression - see my example below:

    IntOnly8.jpg

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 124 Super User 2026 Season 1

#2
Ellis Karim Profile Picture

Ellis Karim 52 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 50

Last 30 days Overall leaderboard