cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Seeddraver
New Member

Trouble with updateif with sharepoint item lookup

I been trying to  make an update to item in sharepoint usein a button, I have a lookup field name restaurante ,  also a choice selector TIpoComida, some of the fields are string o yes/no, but I try patch , updateif, nothing works, every time the error is restaurante is a record and return an error o number, also try different ways of lookup this is my code so far but still with errors, thanks in advance.

 

 

 

 

 

 

UpdateIf(GastosRestaurante;
ID = ThisItem.ID;
{
Title: DataCardValue24_1.Text;
Restaurante:{ '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
Id: DataCardValue9_2.Selected.Id;
Value: DataCardValue9_2.Selected.Value};
FechaConsumo: DataCardValue28_1.SelectedDate;
Valor: DataCardValue24_2;
Invitados:Toggle1.Value;
CantidadInvitados:DataCardValue24_3;
TipoComida:DataCardValue9_3.Selected;
}
)
Back()

 

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
PowerRanger
Super User
Super User

@Seeddraver 

The field restaurante expects a record in this layout

{
Id: 2,
Value: "MN"
}

 

 




​Please click Accept as solution 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 Thumbs Up.

View solution in original post

i did this en green and remove back() and now works, mmm weird thanks 

Restaurante: DataCardValue9_2.Selected;
FechaConsumo: DataCardValue28_1.SelectedDate;
Valor: DataCardValue24_2;
Invitados:Toggle1.Value;
CantidadInvitados:DataCardValue24_3;
TipoComida:DataCardValue9_3.Selected

View solution in original post

3 REPLIES 3
PowerRanger
Super User
Super User

@Seeddraver 

The field restaurante expects a record in this layout

{
Id: 2,
Value: "MN"
}

 

 




​Please click Accept as solution 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 Thumbs Up.

i did this en green and remove back() and now works, mmm weird thanks 

Restaurante: DataCardValue9_2.Selected;
FechaConsumo: DataCardValue28_1.SelectedDate;
Valor: DataCardValue24_2;
Invitados:Toggle1.Value;
CantidadInvitados:DataCardValue24_3;
TipoComida:DataCardValue9_3.Selected

@Seeddraver the green part will give you a record just like I have posted. When you highlite the green part you should see the record just below the Formular bar.




​Please click Accept as solution 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 Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,109)