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

Add multiple new rows to datasource with predetermined values

(0) ShareShare
ReportReport
Posted on by

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:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 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

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard