cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ecrevisse
Helper II
Helper II

Patch lookup fileds two Sharepoint List

How to patch with lookup fields from Sharepoint list? I have two Sharepoint Lists. When booking a room, the room from the Rezervation Base should map to the room from the Room Base.

Screen Shot 06-24-21 at 10.06 AM.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dipak_Shaw
Helper I
Helper I

First, you have to store the selected room in a variable. For eg. if you are showing your rooms in a gallery so in the gallery select button, add the below function - 

Set(varSelectedRoom, ThisItem)

Now, in the patching screen add the below function in your patch button-

Patch(Rezervation,
         Defaults(Rezervation),
        {
RezervationDate:Today(),
Room:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:varSelectedRoom.ID,
                        Value:varSelectedRoom.Room}
              }
         )

 

Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

View solution in original post

2 REPLIES 2
C-Papa
Solution Sage
Solution Sage

Hi, you can just run one patch after the other or do them concurrently for a quicker result

 

Concurrent(Patch(SPLIST1,{ID:LookUp(SPLIST1,[YourCondition]).ID},{Title:"test title 1"}), Patch(SPLIST2,{ID:LookUp(SPLIST2,[YourCondition]).ID},{Title:"test title 2"}))

Dipak_Shaw
Helper I
Helper I

First, you have to store the selected room in a variable. For eg. if you are showing your rooms in a gallery so in the gallery select button, add the below function - 

Set(varSelectedRoom, ThisItem)

Now, in the patching screen add the below function in your patch button-

Patch(Rezervation,
         Defaults(Rezervation),
        {
RezervationDate:Today(),
Room:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:varSelectedRoom.ID,
                        Value:varSelectedRoom.Room}
              }
         )

 

Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (14)