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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / automate record creati...
Power Apps
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?

  • Verified answer
    ChrisPiasecki Profile Picture
    6,428 Most Valuable Professional on at

    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.

     

  • Carlosr Profile Picture
    Microsoft Employee on at

    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.

  • halifaxious Profile Picture
    217 on at

    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

    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

    Good to know. Thanks!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard