web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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,297 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard