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 / Add multiple new rows ...
Power Apps
Unanswered

Add multiple new rows to datasource with predetermined values

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

Have a powerapps page with a gallery, where I want to display 4 records at a time, depending on selected week.

This is fairly simple and easy, but I would like to have a button to the 4 records into a new week. 
The columns I have is:

Type

Week

Value

The user must insert a new value into every row in the gallery, but I would like to add the 4 different types automatically by the use of a button. 

For now my button looks like this: 

Patch(
 Table1,
 Defaults(Table1),
 {
 Type: "A",
 Week: "16",
 },
 {
 Type: "B",
 Week: "16",
 }
)

However this will only add the last values I have and not both into two new rows. 

Any tips on how to solve this?

 

Thanks!

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Change your formula to the following:

    Collect(Table1,
     Table(
     {Type: "A", Week: "16"},
     {Type: "B", Week: "16"}
     )
    )

    This will create two new records with the record values provided.

     

    I hope this is helpful for you.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard