How to generate unique no in sharepoint list

Anonymous
2022-09-08T13:04:16+00:00

Hi,

I am working on a requirement that requires unique no to be generated every time a new project is added in the list.

format of the unique no-P220001

where 22- last 2 digits from current year, e.g. 2022

00001- serial no of project entry

P-project

How can it be achieved using power automate.

I have tried calculated column approach in sharepoint list, but how to merge 3 entries from 3 different columns

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2022-09-09T23:45:00+00:00

    Dear Aisha,

    Thanks for your updates.

    Another way in SharePoint Online may be to use the calculated column. However, the auto-generated ID column can't be applied to the calculated column, you may still need to create an auto-generated column for ID such as NumberID with the auto-populated values by using Power Automate or Power Apps. If you don't want to use Power Automate, you can use Power Apps.

    You can create a single-line text column NumberID, click on Integrate>Power Apps>Customize forms to access Power Apps and type Last(List00D).ID+1 in DataCardValue2, type SubmitForm(SharePointForm1);NewForm(SharePointForm1) on OnSelect in Button Submit, type ResetForm(SharePointForm1);NewForm(SharePointForm1) on OnSelect in Button Reset and finally publish the form to SharePoint Online.

    Then you can use the calculated column such as CalculatedNumber to get the desired number with the formula ="no-P"&TEXT(NOW(),"yy")&"000"&NumberID.

    Result:

    I'm afraid that there may be no out-of-the-box way getting the custom number format in SharePoint Online.

    Thanks for your effort and time.

    Sincerely,

    Cliff | Microsoft Community Moderator

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-09-08T14:38:42+00:00

    Dear Aisha,

    Good day! Thank you for posting in Microsoft Community.

    From description, you want to use power automate to generate unique no in SharePoint list.

    We'd like to help you. Please allow us some time and we will try to test and create customized flow for this requirement. We will post back as soon as we have any update.

    Appreciate your time and understanding. Hope you keep safe and healthy always!

    Sincerely,

    Tina | Microsoft Community Moderator

    0 comments No comments
  2. Anonymous
    2022-09-09T02:40:36+00:00

    Dear Aisha,

    Sorry for the delayed reply and I'm following up on the thread.

    You can create the flow as follows.

    Compose: formatDateTime(utcNow(),'yy')

    Compose2: no-P@{outputs('Compose')}@{body('Format_number')}

    Result in ProjectNumber:

    Thanks for your effort and time.

    Sincerely,

    Cliff | Microsoft Community Moderator

    0 comments No comments
  3. Anonymous
    2022-09-09T04:48:08+00:00

    Hi,

    Thank you for your quick reply.

    Is there any approach in share point to achieve the same?

    0 comments No comments