Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

automate record creation when required field is autoincrement

(0) ShareShare
ReportReport
Posted on by 217

I created a table, PRA_Score where the primary name column is an autonumber.

halifaxious_0-1628097288256.png

Now I want to use Power Automate to automatically create PRA_Score records when an action happens. But I can't figure out what to put in the primary name column since it is insisting I must put something there.

halifaxious_1-1628097426514.png

I suppose I could look up the last PRA_Score record, parse the name (score_####), increment the number and concatenate a new name for the new record. But that feels really kludgy. Is there a better way?

Categories:
  • halifaxious Profile Picture
    217 on at
    Re: automate record creation when required field is autoincrement

    Good to know. Thanks!

  • Carlosr Profile Picture
    Microsoft Employee on at
    Re: automate record creation when required field is autoincrement

    The primary name field can be set to optional:

    Carlosr_0-1628107186878.png

     

     

    This is the recommended approach since it is the intended behavior.  Otherwise, all applications, flows and services that attempt to create a record will need to account for this.

  • halifaxious Profile Picture
    217 on at
    Re: automate record creation when required field is autoincrement

    I don't believe the primary name field can be changed to optional. That was the issue.  Using the null() expression solved the problem.

  • Carlosr Profile Picture
    Microsoft Employee on at
    Re: automate record creation when required field is autoincrement

    I typically change AutoNumber fields to not-required since the system will populate it for you.  Also, ensure that the field is read-only on any forms so that it can't be changed.

  • Verified answer
    ChrisPiasecki Profile Picture
    6,389 Most Valuable Professional on at
    Re: automate record creation when required field is autoincrement

    Hi @halifaxious,

     

    You can pass the Null expression to get past the required validation in your Flow. The platform will take care of populating the name with the generated AutoNumber on the server side. See my working example below:

     

    ChrisPiasecki_0-1628098611795.png

    ChrisPiasecki_1-1628098651719.png

    ChrisPiasecki_2-1628098730450.png

     

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a 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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics