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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,379)