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 Apps / Extract number from St...
Power Apps
Answered

Extract number from String and Sort by extracted number

(0) ShareShare
ReportReport
Posted on by

I have a sharepoint list as my data source. In that list I have a column that has alphanumeric values that I need to remove the prefix and return the largest value number. (example AO9889) the letter prefix is always two characters but have several different combinations. (A-,AO,S-,SO,Q-,QO) 

So in a list like this

AO9887
SO9888
Q-9889
A-9890

 

I would want a formula to return 9890 

I have tried to create a calculated column in my sharepoint list but then ran into delegation issues.

 

Any help would be appreciated I am stuck on this.

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mhawkins 

    Yes, you cannot delegate to calculated columns.  

    Trying to delegate this criteria is going to be a challenge though as you would need to account for each prefix to your column values.

    If your datasource is not expected to be over 2000 items, then you can ignore delegation issues.

    If it is going to be, then I would suggest a separate column in your list (a real number column) and let PowerAutomate populate it for you.  Then you can simply sort that column descending and take the first record and column value.

     

    I suspect that delegation is going to be an issue for you, so I am not mentioning how to do this in an un-delegable way.

     

    I hope this is helpful for you.

     

  • mhawkins Profile Picture
    on at

    I was afraid of that. I created a number column and set my form when adding a new record to that list to get the largest number from that column and add 1 to it. 

     

    Thank you for your help.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard