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 / Know if Power Apps can...
Power Apps
Answered

Know if Power Apps can auto-save gallery information

(1) ShareShare
ReportReport
Posted on by

Very good day,

Please I need your help. I am reading cards through QR and, when I accumulate a quantity of information, I save and send these readings to SharePoint. I want to know if it is possible to implement an auto save that, when recording one or two readings, is automatically saved, performing the same process as the save button.

Thank you so much.

andresnex_0-1720195802485.png

 

save code:  
I want to generate an autosave with or without a button when there are records in the list

 

Set(_informacion;Defaults(Registro_Asistencia));;

ForAll( Gallery1.AllItems ;
Patch(Registro_Asistencia;_informacion;
{
    Título:If(
CountRows(Split( Title1.Text ;","  )) >= 5 ;
 Index(Split(Title1.Text; ","); 1).Value;
" "
);
               
  Upi_Empleado:If(
              CountRows(Split(Title1.Text; ",")) >= 5;
              Index(Split(Title1.Text; ","); 2).Value;
               Index(Split(Title1.Text; ","); 1).Value
    );

Cedula:Index(Split(Title1.Text; ","); If(CountRows(Split(Title1.Text; ",")) >= 5; 3; 2)).Value;

Nombre_Empleado:Index(Split(Title1.Text; ","); If(CountRows(Split(Title1.Text; ",")) >= 5; 4; 3)).Value;

Rh:Index(Split(Title1.Text; ","); If(CountRows(Split(Title1.Text; ",")) >= 5; 5; 4)).Value;

Tipo_Capacitacion:Dropdown2.Selected.Value;
Curso: TextInput1_1.Text  ;
Fecha:DatePicker1.SelectedDate;
Hora:Dropdown1.Selected.Value;
Horario:Dropdown1_1.Selected.Value;
Duracion:Label2.Text;
Objetivo:TextInput1_5.Text;
Facilitador:TextInput1_6.Text;
Upi_Facilitador:TextInput1_7.Text;
Categoria_Zoom:Dropdown2_2.Selected.Value;
Estrategia_Nexans:Dropdown2_1.Selected.Value

}

)
);;

Notify("Guardada la informacion");;
Clear(ScanColeccion);;
 




Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

    Hi @andresnex ,

     

    Having had a quick look at your formula, you seem to be missing a reference to the current item in the ForAll loop. In case the issue is that the same values are saved for all items in the gallery, please try this formula:

    ForAll( Gallery1.AllItems As _Item;
    Patch(Registro_Asistencia;_informacion;
    {
     Título:If(
    CountRows(Split( _Item.Title1.Text ;"," )) >= 5 ;
     Index(Split(_Item.Title1.Text; ","); 1).Value;
    " "
    );
     
     Upi_Empleado:If(
     CountRows(Split(_Item.Title1.Text; ",")) >= 5;
     Index(Split(_Item.Title1.Text; ","); 2).Value;
     Index(Split(_Item.Title1.Text; ","); 1).Value
     );
    
    Cedula:Index(Split(_Item.Title1.Text; ","); If(CountRows(Split(_Item.Title1.Text; ",")) >= 5; 3; 2)).Value;
    
    Nombre_Empleado:Index(Split(_Item.Title1.Text; ","); If(CountRows(Split(_Item.Title1.Text; ",")) >= 5; 4; 3)).Value;
    
    Rh:Index(Split(_Item.Title1.Text; ","); If(CountRows(Split(_Item.Title1.Text; ",")) >= 5; 5; 4)).Value;
    
    Tipo_Capacitacion:_Item.Dropdown2.Selected.Value;
    Curso: _Item.TextInput1_1.Text ;
    Fecha:_Item.DatePicker1.SelectedDate;
    Hora:_Item.Dropdown1.Selected.Value;
    Horario:_Item.Dropdown1_1.Selected.Value;
    Duracion:_Item.Label2.Text;
    Objetivo:_Item.TextInput1_5.Text;
    Facilitador:_Item.TextInput1_6.Text;
    Upi_Facilitador:_Item.TextInput1_7.Text;
    Categoria_Zoom:_Item.Dropdown2_2.Selected.Value;
    Estrategia_Nexans:_Item.Dropdown2_1.Selected.Value
    
    }
    
    )
    );;
    
    Notify("Guardada la informacion");;
    Clear(ScanColeccion);;
  • andresnex Profile Picture
    on at

    @BCBuizer  Hello, what I want is that when you have 2 or 3 records the system performs the saving, in this way the system allows you to save by clicking the button or automatically saves with 3 records

  • BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

    Hi @andresnex ,

     

    That part is understood, but what is the issue with the formula? Does it not perform the task or you don't know how to trigger it?

  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at

    @andresnex ,

    Only coming in here briefly to suggest something to avoid all of that repetition

    ForAll( 
     Gallery1.AllItems As _Item;
     With(
     {
     _Data:
     Split( 
     _Item.Title1.Text;
     "," 
     )
     },
     Patch(
     Registro_Asistencia;_informacion;
     {
     Título:
     If(
     CountRows(_Data) >= 5;
     Index(_Data, 1).Value;
     " "
     ); 
     Upi_Empleado:
     If(
     CountRows(_Data) >= 5;
     Index(_Data; 2).Value;
     Index(_Data; 1).Value
     );
     Cedula:
     Index(
     _Data,
     If(CountRows(_Data) >= 5; 3; 2)
     ).Value;
     Nombre_Empleado:
     Index(
     _Data,
     If(CountRows(_Data) >= 5; 4; 3)
     ).Value;
     Rh:
     Index(
     _Data,
     If(
     CountRows(_Data) >= 5; 5; 4)
     ).Value;
     Tipo_Capacitacion: Dropdown2.Selected.Value;
     Curso: TextInput1_1.Text ;
     Fecha: DatePicker1.SelectedDate;
     Hora: Dropdown1.Selected.Value;
     Horario: Dropdown1_1.Selected.Value;
     Duracion: Label2.Text;
     Objetivo: TextInput1_5.Text;
     Facilitador: TextInput1_6.Text;
     Upi_Facilitador: TextInput1_7.Text;
     Categoria_Zoom: Dropdown2_2.Selected.Value;
     Estrategia_Nexans: Dropdown2_1.Selected.Value
     }
     )
     )
    );;
  • andresnex Profile Picture
    on at

    Hello @BCBuizer , the formula has no problem,   
    What I'm looking for is for the information to save itself when there are records in the gallery, without the button

  • Verified answer
    BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

    Hi @andresnex ,

     

    You may use a Timer control that runs when the screen is visible and saves the contents when it runs out and then resets. More details can be found here: Solved: Autosave with timer control with loop enabled - Power Platform Community (microsoft.com)

  • andresnex Profile Picture
    on at

    @BCBuizer  Thank you very much, the process worked for me

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard