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 / I can't save the last ...
Power Apps
Answered

I can't save the last data entered into the collection

(1) ShareShare
ReportReport
Posted on by 6
In my application, the collection does not allow me to patch the data that is entered in the collection without creating more blank fields, which I should not do, I need to save all the data and when I enter the last value and send, The information is saved, but without creating another blank row to enter.

In this first capture I enter all the data but only the first one is saved in the table, I must give the most so that the other one is saved.
 
In the second screenshot of the application, as I clicked the "+" button, the last data is saved and another empty row of data is added, and I don't know how to remove that.
And also when starting the collection a completely empty row is created in the collection

I have the same question (0)
  • CU21081620-1 Profile Picture
    6 on at
    For the "+" button I am using this patch:
     Patch(
            Colcandidatos,
            Defaults(Colcandidatos),
            {
                Nº_Req: Input_Requisicion.Value,
                'Nombre Proceso': Input_NombreProceso.Value,
                Title: Input_Credencial.Value,
                Nombre: Input_NombreAp.Value,
                Email: Input_Email.Value,
                'Empleado o Candidato': candidatoempleado.Selected,
                'Fecha Límite': fechalimite.SelectedDate
            }
        );
    And to create the collection in OnStart i used
     
    ClearCollect(Colcandidatos,'Lista requerientes');
    Clear(Colcandidatos);    Patch(
            Colcandidatos,
            Defaults(Colcandidatos),
            {
            Nº_Req: Blank(),
            'Nombre Proceso': Blank(),
            Title: Blank(),
            Nombre: Blank(),
            Email: Blank(),
            'Empleado o Candidato': Blank(),
            'Fecha Límite': Blank()
        }
    );
  • Verified answer
    WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at
    To clarify, this code will add a new row to your collection (Collect is better than Patch here)
    Collect(
       Colcandidatos,
       {
          Nº_Req: Input_Requisicion.Value,
          'Nombre Proceso': Input_NombreProceso.Value,
           Title: Input_Credencial.Value,
           Nombre: Input_NombreAp.Value,
           Email: Input_Email.Value,
           'Empleado o Candidato': candidatoempleado.Selected,
           'Fecha Límite': fechalimite.SelectedDate
       }
    );
    If you simply want to start with an empty collection
    ClearCollect(Colcandidatos,'Lista requerientes');
    Clear(Colcandidatos);
    or am I missing something here ?
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard