cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Patch throwing unknown error

Hello, Im completely stuck on this. I have a simple powerapps form i made with SharePoint. The new form has fields such as choice, people picker, text field, dates, etc. I have formatted them all according the MSFT Standard. Yet in the end, I get an exception  which i have no i dea what its saying. 

 

Patch(Proposals, Defaults(Proposals),{Title:DataCardValue1_1.Text,UID:DataCardValue72.Text,Solicitation_x0020_Number:DataCardValue71.Text,Stage:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:1,
  Value:DataCardValue86.Selected.Value},
VT_x0020_Role:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:1,
  Value:VTRole.Selected.Value
  },
  Final_x0020_RFP_x0020_Date:DataCardValue73.SelectedDate,Proposal_x0020_Due_x0020_Date:DataCardValue74.SelectedDate,
  Strategic_x0020_Business_x0020_U:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:1,
  Value:BusinessUnit.Selected.Value
  
  },
  Capture_x0020_Lead:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#f|membership|" & Lower(CaptureLead.Selected.Email),
Department:"",
DisplayName:CaptureLead.Selected.Email,
JobTitle:"",
Picture:"",
Email:CaptureLead.Selected.Email},
Proposal_x0020_Manager:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#f|membership|" & Lower(ProposalManager.Selected.Email),
Department:"",
DisplayName:ProposalManager.Selected.Email,
JobTitle:"",
Picture:"",
Email:ProposalManager.Selected.Email},
Pricing_x0020_Lead:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#f|membership|" & Lower(PricingLead.Selected.Email),
Department:"",
DisplayName:PricingLead.Selected.Email,
JobTitle:"",
Picture:"",
Email:PricingLead.Selected.Email}
  
  
  })

 

 

 

 

3 REPLIES 3
Resolver IV
Resolver IV

I can't see anything obvious looking through the code, I am assuming the red wiggly underline is under the whole function block and therefore giving you no help as to where the code is wrong?

If thats the case I would recommend breaking it down into a smaller patch statement patching one property at a time, get each one working on its own and then start building up into the full thing you have here.  I would also strongly recommend making sure you dont have any spaces in the column names in your datasource, if its SharePoint you can create them without and then rename the column which wont change the underlying cxolumn name.  Avoids all those annoying _x0020_ making the code hard to read .  Maybe too late for this project but worth bearing in mind

 

And why has the code display control on this forum decided it would be useful to put in smileys everywhere you used a 😛 etc.  MS, sort it out.

 

Andy
Read my new blog at -
www.powerappssolution.com

I found the issue, people input values were wrong. Theres got to be a easier way to update the choice and people field. Come on guys! Other than that, good work lol!

I'd be interested to know how they were wrong?

 

And I agree, lookups and complex fields could be easier

 

Andy
Read my new blog at -
www.powerappssolution.com

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (47,892)