Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • Verified answer
    DDM Profile Picture
    79 on at
    Re: Patch dropdown not working

    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.

  • anandm08 Profile Picture
    1,936 Super User 2025 Season 1 on at
    Re: Patch dropdown not working
    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.

  • DDM Profile Picture
    79 on at
    Re: Patch dropdown not working

    Hello, 

     

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

     

    DDM_1-1717165306510.png

     

     

     

  • anandm08 Profile Picture
    1,936 Super User 2025 Season 1 on at
    Re: Patch dropdown not working

    Try this

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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1