web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch dropdown not wor...
Power Apps
Unanswered

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard