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 Apps
Answered

show rows

(0) ShareShare
ReportReport
Posted on by 522

Hello Team,

 

I am little stuck in between, here i need to know it this is possible. I am looking to expose a button as "Add new item" when i click on the button the function is working fine, but what i need is when i click on the button it displays multiple rows. Perhaps i need to get one row at a time.

 

What is the best way to approch, because i am running of ideas?

 

Capture28.PNG

 

Thanks in advance and appreciated !

Categories:
  • dinusc Profile Picture
    Microsoft Employee on at

    Just to clarify, you would like to be able to add multiple rows at a time. If os then please see the "Patch" function: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

  • Nikhil2 Profile Picture
    522 on at
    I meant like , when I click on "Add new item" first row should display for the first time. When I click on second time on "Add new item" second row should display.
  • dinusc Profile Picture
    Microsoft Employee on at

    Sorry. I'm not sure I understand it. Let me try to explain what I understood. You start with an empty screen, on which you have "Add new Item" button. You click on it and that adds a single row to your gallery. You click it again and that adds another row and so on. Finally, you click Save after which all the items are saved to your data source. Is this correct? 

     

  • Verified answer
    Nikhil2 Profile Picture
    522 on at
    Yes pretty much exactly, but just one additional. The form won't be blank it will start with one row after if required I will click on Add new item then second row will appear and so on.
  • Verified answer
    dinusc Profile Picture
    Microsoft Employee on at

    I think a Gallery control would be more suitable for that. I just created a sample prototype. Try this:

    1. Create a new app

    2. Add a new Blank Vertical Gallery control

    3. Add a Button (this is your "Add New Item" button)

    4. Select the button and set Button1.OnSelect=Collect(t, {f1:"",f2:["1","2","3","4"],f3:""})

    5. Select the Screen and set Screen1.OnStart=Collect(t, {f1:"",f2:["1","2","3","4"],f3:""})

    6. Set Gallery1.Items=t

    7. Add 2 TextInput controls and one DropDown control to your gallery. Set TextInpujt1.Default=ThisItem.f1, DropDown1.Items=ThisItem.f2, TextInput2.Default=ThisItem.f3

     

    Now, if you preview your application, you will be able to click on the button and add rows to your gallery. In a real application, you will have to pull data from a source into your dropdown. Also, note the item #5 above. This will add a row automatically on application start.

    Later, you will have to use "Patch" function in order to save your data (when the Save button is clicked).

     

    Hope this helps.

  • Verified answer
    Shanescows Profile Picture
    2,218 Most Valuable Professional on at

    Check out my video on Repeating Tables in PowerApps. I show you how to do all of this and more. 🙂 

  • Nikhil2 Profile Picture
    522 on at

    Hello Team,

     

    Thank you for the solution, well this is the exact solution i was looking for.

     

    Appreciated !

     

    Thanks and Regards,

    Nikhil.

  • Nikhil2 Profile Picture
    522 on at

    Hello,

     

    Thank you for the input, but i am little in between with the below 

     

    I have synchronized both the inputs , but now the problem here is.

     

    1. When i click on Add new item or button new row will be added but with the same first value entered.

    2. Rows are not cleared when i click on button its added new row with old values, when i click on button new row with empty boxes should be avaliable.

    3. I have used this code in the button, but i have found there something missing perhaps i couldnt find out what is missing Patch(ProjectC,{Name:TextInput2.Text,Actual:Value(TextInput3.Text),Cost:dropdown2.Selected.Value});Collect(ProjectC, {Name:"",Actual:"",Cost:""})

     

    If i use like this Patch(ProjectC,First(ProjectC),{Name:TextInput2.Text,Actual:Value(TextInput3.Text),Cost:dropdown2.Selected.Value});Collect(ProjectC, {Name:"",Actual:"",Cost:""}) with the highlighted one it will add new row with no values, if i remove and press the button " The Data source supplied to the function is invalid".

     

    4. If i use First() the values from the second row are replacing to first row.

     

    Well if you could help me on this one, would be appreciated!

     

    Thanks and Regards,

    Nikhil

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard