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 : olhbu6dCKiX6ABdq97W3V4
Power Apps - Microsoft Dataverse
Answered

Create defined number of records

Like (0) ShareShare
ReportReport
Posted on 12 Jan 2024 18:47:42 by 820

Hi

I am working woth model driven app.

I have a table that consists only of 1 column that is autonumber and as well a primary key.

WHat i need to achieve is to be able for user to specify how many records in that table he needs to create so let's say he points 20 and somehow these 20 records in a row sequentel numbers are created. my sequince defined for this autonumber is like this

0000001,0000002,0000003. 

Next time user can decide that he wants to create more or less and it also creates same way starting numbers from last record?

Any ideas how to achieve it?

Categories:
  • Verified answer
    julijazas Profile Picture
    820 on 14 Jan 2024 at 12:01:55
    Re: Create defined number of records

    @dpoggemann @parvezghumra 

    Thanks guys but i actually ended up with some other solution:

    What i did is i created manually my first record. then i selected this record and created a flow:

    When a record is selected and i also pass a number as a parameter to flow

    I initiated a integer variable and set this number as a value

    then inside loop until

    varbiable=0

    add row

    decrease variable

    And Eurika user select any record inside existing table ruins flow enters number and gets the job done

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on 13 Jan 2024 at 23:32:22
    Re: Create defined number of records

    Hi @jja ,

    I have done this similar approach in multiple model-driven applications following this approach, hopefully works for you...  Most of the time it has been I needed to create specific records that needed to be completed for a job etc.

     

    Normally I do the following:

    1. Create a parent table that will have 1:N relationship to the child records.
    2. You can create a custom command bar action (https://youtu.be/aviOlsv4TdI?si=sPULsDoKh4IHtDIw) to create the records but I normally do this simply by setting up a field on the parent table that would be the number of records to create (you could also define the sequence to start from as well on this table with a different field)
    3. I setup a flow on change of this field to create the records that would all be child records, now you can not use auto-number if you are trying to set numbers starting from 1 for these child records as auto-number will keep going up in count and not start over based on different parent.
    4. The Power Automate flow will create the records as required.
    5. Add lookup on the table you mentioned above and this will be the driving table for the user to create the 20+ records etc. but you may already have this table...
  • Parvez Ghumra Profile Picture
    1,579 Moderator on 12 Jan 2024 at 19:38:59
    Re: Create defined number of records

    @jja One way of achieving this would be to build a simple Canvas App which prompts the user to specify the number of records to be created. Upon submission, it could call a Cloud Flow to create the specified number of records.

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 our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Featured topics

Loading complete