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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / automate record creati...
Power Apps
Unanswered

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?

I have the same question (0)
  • Verified answer
    ChrisPiasecki Profile Picture
    6,422 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard