web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / patch to sharepoint li...
Power Apps
Unanswered

patch to sharepoint list with lookup column

(0) ShareShare
ReportReport
Posted on by 19

Hi there,

 

I have two lists in SharePoint and there is a relationship between list A and List B.
List B has a lookup column.

Idea_Id is a lookup column in list B and the type of idea_Id is an ID from list A, I want to add new data to list B if this data does not exist. So, I type the code below to check if data already exists 

 

 

If(IsBlank(LookUp('Votes-Details_2',Idea_ID = ThisItem.ID)),
Set(varLoad,true); 
Patch(
 'Votes-Details_2',
 {
 Ideas_Id: Gallery3_3.Selected.ID, Title:Gallery3_3.Selected.Title
 }
);
Set(varLoad,false);,false)

 

but I have an error when checking if data already exists, the error is :

incompatible types for comparison, These types cant be compared: Record, text

 

Also, I can't add data to Idea_Id using the patch function, the error is : 

the type of this argument does not match the expected type Record

 

Categories:
  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    @ashwagamz ,

    You have three posts on the same subject - I have responded to one here

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard