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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Finding Maximum Values Then Incrementing for Multiple Columns From a Sharepoint List

(0) ShareShare
ReportReport
Posted on by 2

Hello

 

I am currently trying to design a Sharepoint list for work permits in tandem with a Power Automate workflow. I have been trying to get a simple workflow to generate a unique value that is the highest value in the column + 1. For example I am making a new entry and the last permit number was #1002 so when I create a new entry the permit number will be #1003.

 

Here is the tricky part, I have different types of permits that all need to have serial numbers constantly having the maximum value generated. So I may have one entry in the list that generates the number work permit while also generating one for a special shutdown permit. Every way that i go about it just becomes an overcomplicated mess.

 

below are some snippets to help illustrate my problem.

JubJub_3-1662621687602.png

 

JubJub_1-1662621462622.png

 

JubJub_2-1662621482984.png

I keep running into problems with data types. what is the simplest way to find the maximum value from a dynamic array variable. I can't use the order by descending then only take the first entry since I will have to search through multiple columns and not every single entry is consecutive from the last entry. I need to be able to define a variable then use the max() expression.

 

I would be grateful for any insight from anyone experienced with power automate.

 

I have the same question (0)
  • Unknown geen idee Profile Picture
    1,757 on at
    Re: Finding Maximum Values Then Incrementing for Multiple Columns From a Sharepoint List

    Dear JubJub,

     

    I am not sure if this is the most elegant solution, but you may want to try and make it work.

    What if you create another list/table seperately to hold the permit numbers.

    In a seperate flow you access this number list and calculate the new number which you use in your permit list.

    The key is that this seperate flow (while called from your main flow) has a concurrency setting ... it does not allow the flow to run for only 1 instance, thereby eliminating the possibility of generating multiple numbers at the same time (each wait their turn).

     

    Alternatively, if you could change the format of your permit numbers, I would just take a Utc(Now) value and use the digits in this as your unique and increasing permit number.

     

    Hope my logic makes sense and it works out for you.

    Happy flowing,

    Koen 

  • JubJub Profile Picture
    2 on at
    Re: Finding Maximum Values Then Incrementing for Multiple Columns From a Sharepoint List

    Hi Koen,

     

    This will likely be the way I will have to execute the logic but it just seems strange to me that I can't find the max value in a column, similar to an excel spreadsheet where a cell value =Max(WP10register[Serial Number])+1.

     

    It just seems like there is a way to be able to convert my data into a format that workflow can then use the max expression on, then increment by 1. If it turns out there is no way to accomplish it, then what you described will be my method.

     

    Unfortunately I am not able to change the format of the permit number as the system is active with a long history but I agree that would make the process a bit simpler.

     

    Thanks for the response.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard