cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Crissceron
Helper I
Helper I

Patch function is not working with sharepointlist - No visible errors.

Hi!

 

I'm trying to patch a record in a Sharepoint list but is not working... 

In the "OnSelect" property of the buttom i'm using the next code

 

 

 

Patch(Defaults(Almuerzo_lista);

{Menu_lunes:Text(Dropdown1.SelectedText.Menu_lunes);


Usuario_Orbit:Label2.Text;
Nombre:TextInput1.Text;
Area_Faena:TextInput1_1.Text;

Title:TextInput2.Text ;

 Turno_lunes:Text(Dropdown1_2.SelectedText.Turno) ;
 Jugo_lunes:Text(Dropdown1_3.SelectedText.Jugo) ;
 Menu_martes:Text(Dropdown1_4.SelectedText.Menu_martes) ;

 Turno_martes:Text(Dropdown1_6.SelectedText.Turno) ;
 Jugo_martes:Text(Dropdown1_7.SelectedText.Jugo) ;
 Menu_miercoles:Text(Dropdown1_8.SelectedText.Menu_miercoles) ;

 Turno_miercoles:Text(Dropdown1_10.SelectedText.Turno) ;
 Jugo_miercoles:Text(Dropdown1_11.SelectedText.Jugo) ;
 Menu_jueves:Text(Dropdown1_12.SelectedText.Menu_jueves) ;

 Turno_jueves:Text(Dropdown1_14.SelectedText.Turno) ;
 Jugo_jueves:Text(Dropdown1_15.SelectedText.Jugo) ;
 Menu_viernes:Text(Dropdown1_16.SelectedText.Menu_viernes) ;

 Turno_viernes:Text(Dropdown1_18.SelectedText.Turno) ;
 Jugo_viernes:Text(Dropdown1_19.SelectedText.Jugo) ;
 Vegetariano_lunes:Text(Dropdown1_20.SelectedText.Vegetariano_lunes) ;
 Vegetariano_martes:Text(Dropdown1_21.SelectedText.Vegetariano_martes) ;
 Vegetariano_miercoles:Text(Dropdown1_22.SelectedText.Vegetariano_miercoles) ;
 Vegetariano_jueves:Text(Dropdown1_23.SelectedText.Vegetariano_jueves) ;
 Vegetariano_viernes:Text(Dropdown1_24.SelectedText.Vegetariano_viernes) ;

 Agregado_lunes:Text(ComboBox1.Selected.Agregado_lunes) ;
 Agregado_martes:Text(ComboBox1_1.Selected.Agregado_martes) ;
 Agregado_miercoles:Text(ComboBox1_2.Selected.Agregado_miercoles) ;
 Agregado_jueves:Text(ComboBox1_3.Selected.Agregado_jueves) ;
 Agregado_viernes:Text(ComboBox1_4.Selected.Agregado_viernes) ;




 Fecha_lunes:DatePicker2_1.SelectedDate ;
 Fecha_martes:DatePicker2_2.SelectedDate ;
 Fecha_miercoles:DatePicker2_3.SelectedDate ;
 Fecha_jueves:DatePicker2_4.SelectedDate ;
 Fecha_viernes:DatePicker2_5.SelectedDate 
});;

 

 

 

There is no visible error with the buttom that im using however is not creating any record in the sharepoint list.

 

Can anyone help me with this??.

 

 

Thank you!.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@Crissceron 

The first argument to Patch must specify the data source. Therefore, your formula should begin like this:

Patch(Almuerzo_lista;
      Defaults(Almuerzo_lista);
      {Menu_lunes:Text(Dropdown1.SelectedText.Menu_lunes);

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

@Crissceron 

What are the data types for each of your columns in your list?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
timl
Super User
Super User

@Crissceron 

The first argument to Patch must specify the data source. Therefore, your formula should begin like this:

Patch(Almuerzo_lista;
      Defaults(Almuerzo_lista);
      {Menu_lunes:Text(Dropdown1.SelectedText.Menu_lunes);

I can't believe I forgot that. Thank you

RandyHayes
Super User
Super User

@Crissceron 

LOL...it happens.  Even I missed that one.  Eagle-eyed @timl !!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
timl
Super User
Super User

Thanks @RandyHayes!! Yes, it's very easy to miss, particularly with a very long Patch statement like this.

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,268)