cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

patch lookup column from powerapps

I have a button with which I want to insert the IDs of 3 lists in a list called winners that has 3 fields that are search type these fields refer to the 3 lists indicated above for the best understanding I will show the formula I want to complete

 

download (19).png

 

getting the IDs in powerapps is no problem but trying to patch these 3 fields gives error

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: patch lookup column from powerapps

Hi @King ,

Do you want to patch three lookup fields?

Could you tell me

1)whether you want to create a new record or edit an existing record?

2)is your data source sharepoint list?


The right syntax of Patch should be like:

Patch(table,Defaults(table),{....})   //create a new record

Patch(table,the item that you want to edit ,{...})   //edit an existing record

You could see one lookup field value as one record from the related list.

 

I assume that you want to create a new record, please try this formula:

Patch(Ganadores,Defaults(Ganadores),{idInvitado:LookUp(relatedlist1,relatedfield1=fieldRandomRecord.ID), 
 idPremio:LookUp(relatedlist2,relatedfield2=ThisItem.ID), 
 idEvento:LookUp(relatedlist3,relatedfield3=lblIDevento.Text)
})

 What's more, if you have required field , please update record with this field.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: patch lookup column from powerapps

Hi @King ,

Do you want to patch three lookup fields?

Could you tell me

1)whether you want to create a new record or edit an existing record?

2)is your data source sharepoint list?


The right syntax of Patch should be like:

Patch(table,Defaults(table),{....})   //create a new record

Patch(table,the item that you want to edit ,{...})   //edit an existing record

You could see one lookup field value as one record from the related list.

 

I assume that you want to create a new record, please try this formula:

Patch(Ganadores,Defaults(Ganadores),{idInvitado:LookUp(relatedlist1,relatedfield1=fieldRandomRecord.ID), 
 idPremio:LookUp(relatedlist2,relatedfield2=ThisItem.ID), 
 idEvento:LookUp(relatedlist3,relatedfield3=lblIDevento.Text)
})

 What's more, if you have required field , please update record with this field.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,656)