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 Datasource with ...
Power Apps
Unanswered

Patch Datasource with Lookup columns from Collection

(0) ShareShare
ReportReport
Posted on by 321

@rampprakash  Thanks for your Answer but it is not working. 

Let me try to explain in detail:

I have one Table in Dataverse (Manhours) with following columns:

ashokpershad_2-1635839721793.png

 

Now I used one FORM for this table. When I press one submit button after filling details in this form I am creating one collection (displayed in Gallery5) too where I am storing all  FORM submit entries. Please note this Submit button actually not for SUBMITFORM function.

Gallery5:

ashokpershad_1-1635839285445.png

Now I want to Patch this Gallery back to my Dataverse Table using this ForAll and Patch functions. 

I used Following Formula:

 

 

 

ForAll(Gallery5.AllItems, Patch(Manhours, Defaults(Manhours), {WOrder:glry5WO.Text, 'Lab Supervisor':LookUp(Manhours, 'Lab Supervisor'.Supervisor = glry5Sup.Text), 'Service Engineer': LookUp(Manhours, 'Service Engineer'.'Engineer Name' = glry5eng.Text), 'Date Started':glry5DS, 'Date Completed': glry5DE, 'Actual Work Hours': glry5AH.Text, Remarks: glry5Remarks.Text}))

 

 

 

But this formula is showing following error:

ashokpershad_0-1635841333172.png

 

What formula shall I use? 

 

I hope now its clear.

 

Categories:
I have the same question (0)
  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    From the error message you are trying to create a record that is not matching the table you are patching to. It appears some of the data is not the correct type (ie: you are supplying a text value and it wants a number) and/or the names are not correct or you are not providing a value to a field that is required. You have the Engineer Name being patched with a text value, but it is a Lookup, so I believe it needs a record. I'm not sure what glry5DS is but is it a valid date/time? It will be tedious, but you just need to make sure everything matches. The error messages usually let yo know what PowerApps expects, you just need to go column by column. It is also complaining that some values don't exist.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard