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 dropdown not wor...
Power Apps
Answered

Patch dropdown not working

(0) ShareShare
ReportReport
Posted on by 79

Hi All, 

 

I am struggling to get patch function to work. Code below is not patching 

Please can you help.

Thanks

 

Patch(
    'Archive',
    LookUp(
        'Archive',
        ID = varItemID
    ),
    {
        ContractOwner: cbxContractOwnerView.Selected,
        Company: cbxCompanyView.Selected,
        BusinessFunction: cbxBusinessFunctionView.Selected
    }
);

 

 

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

    Try this

    Patch(
     'Archive',
     LookUp(
     'Archive',
     ID = varItemID
     ),
     {
     ContractOwner: cbxContractOwnerView.Selected.Value,
     Company: cbxCompanyView.Selected.Value,
     BusinessFunction: cbxBusinessFunctionView.Selected.Value
     }
    );
  • DDM Profile Picture
    79 on at

    Hello, 

     

    Thanks for responding, i tried that but it returns an error.

     

    DDM_1-1717165306510.png

     

     

     

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at
    Patch(
     'Archive',
     LookUp(
     'Archive',
     ID = varItemID
     ),
     {
     ContractOwner: {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership| User().Email",
     Department: "",
     DisplayName: User().DisplayName, 
     Email: User().Email,
     JobTitle: "",
     Picture: ""
     },
     Company: cbxCompanyView.Selected.Value,
     BusinessFunction: cbxBusinessFunctionView.Selected.Value
     }
    );

     

    try this.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    DDM Profile Picture
    79 on at

    Hi Anand,

     

    I figured it out. It was my varItemID.

     

    It was a text value not a number. To change to number i did following:

     

    Set(varListItemID, Value(varItemID));

     

    Patch(
        'Archive',
        {ID: varListItemID},
        {
            ContractOwner: cbxContractOwnerView.Selected,
            Company:  {Value: cbxCompanyView.Selected.Value},
            BusinessFunction: {Value: cbxBusinessFunctionView.Selected.Value},
            Site: {Value: cbxSiteView.Selected.Value},
            Country: {Value: cbxCountryView.Selected.Value},
            DocumentSubject: txtDocumentSubjectView.Text,
            DocumentDescription: txtDocumentDescriptionView.Text,
            ContractDescription: txtDocumentDescriptionView.Text
        }
    )

     

    Thanks for you help.

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 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard