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 Rows to a...
Power Apps
Answered

Add Multiple Rows to a Collection Using Cascading Dropdowns & Text Input Boxes

(0) ShareShare
ReportReport
Posted on by 71

Hi Everyone!

 

So I am creating an app that will automate equipment sizing for our Salesmen.  The app creates a collection based on the input from the Salesmen.  There are three cascading/dependent Dropdowns plus a few Text Input boxes that all work perfectly.  I have a button that will add all this information into a Collection called Survey (each Dropdown and Text Input is a different column in a single row). 

 

So all this is working perfectly but I would like to have a "Next" button that would allow the Salesmen to make new selections from the same Dropdowns/Text Input boxes to add another row to the Collection.  And also a "Done" button to stop adding rows and save the data in the Collection to a new List.

 

How do I go about clearing all the first choices (without deleting the information in the Collection) and adding a new row to the Collection (keeping the first row from the first selections)?

 

I have seen some similar questions where the "Patch" function was used.  But that function does not seem to fit what I am trying to accomplish (or am I misunderstanding its use)?

 

Thank you so much for any advise/suggestions.

  

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @suzinger 

    Could you please give me an example of what the collection should look like before and what the collection should like after?   I have a guess of what you want to do but I am not certain.

     

     

    Here's what I think you wanted.  You starting with a collection like this before any changes:

     

    ID Field1 Field2 Field3
    1 Some Text Some Text Some Text
    2 Some Text Some Text Some Text
    3 Some Text Some Text Some Text
    4 Some Text Some Text Some Text
    5 Some Text Some Text Some Text

     

    And the collection should look like this after the changes:

     

    ID Field1 Field2 Field3
    1   Some Text Some Text
    2   Some Text Some Text
    3   Some Text Some Text
    4   Some Text Some Text
    5   Some Text Some Text


    You can get this result by using the UPDATEIF function and setting the 2nd argument to True so it changes all fields in the column to Blank.  I have provided 2 options below.  Please choose the one that suits you best.

     

    UpdateIf(your_collection_name, True, {Field1: ""})
    UpdateIf(your_collection_name, True, {Field1: Blank()})

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    pontusofsweden Profile Picture
    255 on at

    Hi @suzinger!

     

    Based on your requirements, my suggestion is the following:

    1. Reset all the controls by using the Reset function when pressing the next button (OnSelect). This will reset the controls to their default value and wont affect the saved values in the collection I.e. Reset(Dropdown1). Then add the record by using Collect and not ClearCollect.

    2. When pressing Done, just create a new Collection by fetching all data from Survey. Collect(NewCollection,Survey). You could also, at the same time, clear the Survey collection if you dont the need the values anymore.

     

    BR

    Pontus

  • suzinger Profile Picture
    71 on at

    Oh my goodness!  Thank you @pontusofsweden!  I was totally making this much more difficult than it needed to be!  I sincerely appreciate your assistance! 🙂

  • pontusofsweden Profile Picture
    255 on at

    My pleasure, @suzinger 🙂

    BR

    Pontus

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
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard