Forum Discussion

W_AT_H's avatar
W_AT_H
Copper Contributor
Aug 14, 2025
Solved

Automated Lists numbering in PowerAutomate

Hi All, I could use some advice on a automated stream I created which is coupled to an online Microsoft List on a Sharepoint site. I want this stream to act when a new list item is created through a...
  • Rob_Elliott's avatar
    Aug 15, 2025

    W_AT_H​ an alternative way to do this is shown below. The current maximum number is 232 and the expected new maximum number is 233. As you'll see, the flow runs successfully and creates the new item with the correct number.

    The CountryID is a number column.

    To get the current maximum number sort the list by CountryID descending and just bring back the top 1:

    Add an apply to each and add a compose with the expression int(item()?['CountryID']). Set the variable you initialized earlier with the outputs of the compose: Then add an increment variable action and set it to increment by 1.

    Use the variable  for the CountryID of the new list item.

    This is the result.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

Resources