cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
King
Level: Powered On

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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,915)