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 / Lookup column patching...
Power Apps
Answered

Lookup column patching error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I get this error:

 

DanielRK_0-1631624332531.png

 

When I submit my form in powerapps to Sharepoint my datasource.

 

Here's the full formula for the 'on select' property of the form (more below:

 

 

Set(
 varFormData_InApp,
 Form2_2.LastSubmit
);
If(
 varFormData_InApp.Status.Value = "New",
 Patch(
 'CAPEX-Approvals',
 Defaults('CAPEX-Approvals'),
 {
 Title: varFormData_InApp.Approver.DisplayName,
 Approver: {
 Claims: varFormData_InApp.Approver.Claims,
 DisplayName: varFormData_InApp.Approver.DisplayName,
 Email: varFormData_InApp.Approver.Email,
 Department: "",
 JobTitle: "",
 Picture: ""
 },
 Parent_Lookup: {
 Value: varFormData_InApp.ID,
 Id: Value(varFormData_InApp.ID)
 },
 Parent_ID: Value(varFormData_InApp.ID)
 }
 );
 Patch(
 'Capital Expenditure Applications',
 varFormData_InApp,
 {Status: {Value: "Submitted"}}
 );
 Office365Outlook.SendEmail(
 DCVApprover.Selected.Email,
 "CAPEX: " & varFormData_InApp.ID & " " & varFormData_InApp.Title,
 varFormData_InApp.Author.DisplayName & " has submitted capex application " & varFormData_InApp.ID & " " & varFormData_InApp.Title & "." & "Please click on the link to review. 
<a href=""https://apps.powerapps.com/play/77fafbe1-31db-4fa0-bd00-4f4f610a1c49?tenantId=83829cfc-b343-4f30-9e26-6e8eb13f8fbc&CapexID=" & varFormData_InApp.ID & """>APPROVE</a>",
 {
 IsHtml: true,
 Importance: "Normal"
 }
 )
);

 

 

Here's the part that the error message is complaining about. I've tried a range of varying how it's written and it keeps giving the same error.

 

 

Parent_Lookup: {
 Value: varFormData_InApp.ID,
 Id: Value(varFormData_InApp.ID)
 },

 

 

Please help!

 

Thank you.

 

Regards,

 

Daniel

Categories:
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Update your Lookup to

    Parent_Lookup: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: varFormData_InApp.ID,
     Id: Value(varFormData_InApp.ID)
     },
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @StalinPonnusamy ,

     

    Thank you very much for your help.

     

    I updated the formula exactly and I still get the same error when I submit a new item.

     

    DanielRK_0-1631626410527.png

     

  • Verified answer
    JyotiYadav Profile Picture
    7 on at

    You can try something like below :-

    Parent_Lookup:{
    Id: LookUp(
    Parent_Lookup,
    ID = varFormData_InApp.ID,
    ID
    ),
    Value: LookUp(
    Parent_Lookup,
    ID = varFormData_InApp.ID,
    Title
    )
    }
    Hope it helps!
    Thanks!
    Jyoti Yadav

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    I just retested the lookup and works. 

     

    StalinPonnusamy_0-1631627648982.png

     

    Is the Parent_Lookup is multi-select?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @StalinPonnusamy ,

     

    Thanks for writing back. I checked and It's single select. Here's my settings:

     

    DanielRK_0-1631628785037.png

     

     

     

    I noticed that you're referencing controls in your formula and I'm referencing a variable. 

     

    Could this be the issue?

     

    Thanks again.

     

    Regards,

     

    Daniel

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Nope. it should not be. In end, it requires the ID

     

    Make sure Variable has valid ID which refers SP List ID

     

    Parent_Lookup: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", 
     Id: Value(varFormData_InApp.ID),
    Value: ""
     },

     

     

    Another option is to hard code and test it

     

     

    Parent_Lookup: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", 
     Id: 1, //Any Valid id
    Value: ""
     },

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @StalinPonnusamy ,

     

    I tried as you said and same result. I'm at a lose as to what I'm doing wrong?

     

    DanielRK_0-1631632632795.png

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @JyotiYadav,

     

    Thank you for your help but I tried this and it isn't working. 

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @StalinPonnusamy ,

     

    I mistakenly marked an answer above as a solution.

     

    Regards,

     

    Daniel

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Create New field (Lookup) and try the same. Looks like some issue with the Field.

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 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard