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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,555)