cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xtcl2000
New Member

How to create multiple rows of data at a time through variables?

For example:

Via the auto-created Power-Apps, we can add one row in Dataverse. 

xtcl2000_0-1659324474126.png

If we setup field "Repetition" as variable, can we copy the data automatically and add multiple rows?

Result:

xtcl2000_1-1659324845328.png

If the input value of the variable is 100, we can get 100 rows of data with the same content

 

 

How to realize the above functions in power apps?

 

thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions

What do the file numbers represent and what is the purpose of using the sequential number?

I think I would try to approach this a different way, but I don't know enough about the requirements and purpose of this scenario.

As a rule of thumb, assigning meaning to a surrogate key is best avoided.

View solution in original post

3 REPLIES 3
PaulD1
Super User
Super User

You could use the Sequence function to set how many times you want to iterate and then either Patch each record via a ForAll or Patch to a local collection and then Collect the data into the destination table.

The following links may be of some assistance:

Sequence function in Power Apps - Power Platform | Microsoft Docs

7 Ways To Use The PATCH Function In Power Apps (Cheat Sheet) (matthewdevaney.com)

PATCH Multiple Records In Power Apps 10x Faster - Matthew Devaney 

Note: I believe that collecting into the source is only quicker for Dataverse. SharePoint and SQL Connectors (which don't get the same level of investment) will just 'translate' the Collect into the equivalent of a ForAll and do the processing ReBAR (row by agonising row).

That said - what is the purpose of repeating the same data? There is a saying in relation db design - 'if something is true, saying it twice does not make it any truer'. If you are repeating data you likely have an issue with your data model.

 

thanks.

I'm developing an program via Power Apps and Dataverse, using the "auto number" feature, to create unique auto numbers as the file name.  That program is used for file name management. there are many people sharing this program.  Everyone needs to use this program to generate some consecutive unique numbers as file names.

for example:

user A generated 5 numbers: 00001 - 00005

user B generated 3 numbers: 00006 - 00008

user C generated 4 numbers: 00009 - 00012

 

What do the file numbers represent and what is the purpose of using the sequential number?

I think I would try to approach this a different way, but I don't know enough about the requirements and purpose of this scenario.

As a rule of thumb, assigning meaning to a surrogate key is best avoided.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,054)