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
Super User
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,596)