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 / request in database
Power Apps
Unanswered

request in database

(0) ShareShare
ReportReport
Posted on by 132

Hello,

I am new to PowerApps and I cannot create a function to automatically implement a number based on the database.

Here is an exemple of a table :

 

C1

Tom2

Sophia1
Robin3
Tom1
Robin2
Robin1

 

I want to create a function to find in column C1 the Tom followed by the maximum number and then be able to write in label, Tom with the maximum number +1. Here we write Tom3 in the label because Tom2 is the maximum.

 

Voila, thanks for the help 🙂

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    To Sort it you can use this:

    Sort(DataSource; C1; Ascending)

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

  • taubry Profile Picture
    132 on at

    My final goal is to write the Tom (n + 1) in a label.

  • taubry Profile Picture
    132 on at

    Thanks, this can help me but I am unable to do the function ...

    I should be able to find in the column the maximum number following Tom. If I sort by descending I will have Leon Peter Tom etc.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Okay.. So, you need to split the collumn and them, trasnform it in value and add 1

    For split function:

    https://docs.microsoft.com/pt-pt/powerapps/maker/canvas-apps/functions/function-split 

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @taubry ,

    Split will not work here as it needs a separator - try the below which should add the column you want - note this will work on single (1-9) numbers - please don't ask about bigger ones as what you are attempting would be much better done with a separator (Tom-2)

    With(
     {
     wList:
     AddColumns(
     YourDataSource,
     "SortNo",
     Value(
     Right(C1,1)
     ),
     "NameField",
     Left(
     C1,
     Len(C1)-1
     )
     )
     },
     AddColumns(
     GroupBy(
     wList,
     "NameField",
     "Data"
     ),
     "MaxNew",
     Namefield & Text(Max(Data,SortNo)+1)
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard