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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch related datavers...
Power Apps
Unanswered

Patch related dataverse column in a Model Driven App

(1) ShareShare
ReportReport
Posted on by 1,164
 
Hi,
 
Does anybody have some examples on how I can achieve this?
 
I am trying to create a Patch statement that duplicates a related record but can't work out how to get the column that actually creates the relationship link?
 
Whilst the answer to my previous post is here https://community.powerplatform.com/forums/thread/details/?threadid=ff9f3da6-f281-ef11-ac20-7c1e520187c4 it didn't quite answer and won't let me respond to the suggested answer.
 
When I go to add the Table that I need to perform the lookup on, the auto suggest doesn't even list it as an option. (as per screenshot below
 
 
This is the attempt ate a believe should work
 
Patch(
'Quote Line Item Calcs',
Defaults('Quote Line Item Calcs'),
{'Product Cost':Self.Selected.Item.'Product Cost',
'Quote Line Item': LookUp('Quote Line Items', Name = Self.Selected.'Quote Line Item')
})
 
but is throwing error "Name isn't valid" for all 3 issues (table name, column name for related table and column name for this table.
 
 
Thanks
 
Todd
Categories:
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Hi Tango,
     
    I am back! :D
     
    You need to make sure the Dataverse table is a part of your app. If yes, then refresh it, save & publish, close and reopen (if you have not already tried this, it helps).
    Can we try the following please:
    Patch(
    'Quote Line Item Calcs',
    Defaults('Quote Line Item Calcs'),
    {'Product Cost':Self.Selected.Item.'Product Cost',
    'Quote Line Item': LookUp('Quote Line Item Calcs', ID = Self.Selected.Item.ID).'Quote Line Item'
    //you can replace with the ID column in your table
    })
    Hope this helps. 
     
    Kind regards,
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard