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.
save code:
I want to generate an autosave with or without a button when there are records in the list
@BCBuizer Thank you very much, the process worked for me
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)
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
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
}
)
)
);;
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?
@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
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);;
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional