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
Answered

creating a 2 digit number

(0) ShareShare
ReportReport
Posted on by

Hi All

 

I am trying to auto create a two digit number starts from 01 and maximum to 99 and update to column "Sub" and add one for next new item. but the calculation needs to depend on different value from other column "Version".

 

For example

the first item add with "Version" :"A" should create 01, and the second item add with "Version": "A" should create 02.

but if the third item add with "Version": "B" the number should create as "01" since it's the first item with version "B".

Does anyone have idea about it?

thanks! 

I have the same question (0)
  • v-yetonggu-msft Profile Picture
    on at
    Re: creating a 2 digit number

    Hi @Anonymous ,

    Do you want to create a two digit number starting from 01 and up to 99 based on the different values in the "Version" column and update it in the "Sub" column?

    Could you please tell me what you need to do when the data exceeds 99?

    If so ,I have a test for your reference.

    In my scenario:

    vyetonggumsft_0-1697106335354.png

    vyetonggumsft_1-1697106644281.png

    formatNumber(length(outputs('Get_items')?['body/value']),'D2')
     
     My SharePoint List:
    vyetonggumsft_2-1697106718394.png

    Best Regards,

    Sunshine Gu

     

  • Community Power Platform Member Profile Picture
    on at
    Re: creating a 2 digit number

    Hi @v-yetonggu-msft 

     

    is it the same using "update item" and "update item 2"?

    it shows one digit number and didn't count depending on "Version" value.

    By the way, is there any column setting restrict in the list?

     

    thank you.

  • v-yetonggu-msft Profile Picture
    on at
    Re: creating a 2 digit number

    Hi @Anonymous ï¼Œ

    The "update item" doesn‘t matter "update item 2".

    The "sub"column is text type column.

    Could you tell me why you can only get 1 digit?

    What to do when the data exceeds 99?

     

    Best Regard,

    Sunshine Gu

  • Community Power Platform Member Profile Picture
    on at
    Re: creating a 2 digit number

    Hi @v-yetonggu-msft 

     

    below is my flow and i try to update"sub" column to single line of text but it return with error saying the column should be set as "number".

    but seems like doesn't work.

    i think the amount won't be that much to 99 for single version so no need restrictions

    andrew0lin_1-1697190296053.png

     

    andrew0lin_0-1697189628337.png

     

     

  • v-yetonggu-msft Profile Picture
    on at
    Re: creating a 2 digit number

    Hi @Anonymous ï¼Œ

    Please follow these steps:
    1) Please re-create a sharepoint list containing the 'Title', 'Version', and 'sub' columns, and set the 'sub' column to a single-line text column.
    2) Change the List Name in the 'When an item is created', 'Get items', 'update item' operations to the newly created List Name in the flow.

    Best Regards,

    Sunshine Gu

  • Community Power Platform Member Profile Picture
    on at
    Re: creating a 2 digit number

    Hi@v-yetonggu-msft 

     

    as you can see 2 digit works well but the sub number seems adding directly without identify the " Version " Value.

     

    andrew0lin_0-1697537092359.png

     

    thanks for your help!

    Andrew

     

  • Verified answer
    v-yetonggu-msft Profile Picture
    on at
    Re: creating a 2 digit number

    Hi @Anonymous ,

    Please set a Filter Query condition, clear the items in the SharePoint list, and run the flow.

    vyetonggumsft_1-1697539567932.png

     

    Best Regards,

    Sunshine Guu

     

     

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 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard