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 / unable to patch choice...
Power Apps
Answered

unable to patch choice column in SP list

(0) ShareShare
ReportReport
Posted on by 118

 Hi,

Trying to patch the existing SP list record choice column with the attached command but unable to get the result

 

After execution the gethelp on error shows "The specific record was not found" though SP list has the record with status"Reported".

 

Appreciate a quick help

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Try the following code instead

    ForAll(
     Filter(
     GalleryReported.AllItems,
     Status.Value = "Reported"
     ),
     Patch(
     Mobility,
     ThisRecord,
     {Status: {Value: "Approved"}}
     )
    )

    Since Status is a Choice column you have to patch it with an object record.  {Value:"Approved"} will set the value property of the Status record.

  • shoebwk Profile Picture
    118 on at

    Getting the same error {attached}

    I can also see the Internal Field name for Status column is
    /_layouts/15/FldEdit.aspx?List=%7B6BF7CC6C-A494-4A9C-A242-983541A87B83%7D&Field=pcof

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Change it to use the internal field name.  I tested it on a choice column in one of my lists where the internal name is 'status' and it works for me.

  • shoebwk Profile Picture
    118 on at

    I am not sure why it is not work.

    Here I removed the complex column dependencies and now both the columns in powerapps in SP list are text field. Still I am getting the same error

     

    ForAll(
    Filter(
    GalleryReported.AllItems,
    ApprovalStatus = "Reported"
    ),
    Patch(
    Mobility,
    ThisRecord,
    {ApprovalStatus:"Approved"}
    )
    )

  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @shoebwk ,

    Could you tell me:

    1)status field data type?

    2)what does "ThisRecord" represent? a variable ? or something else?

    If you want to update all the items that ApprovalStatus = "Reported" to ApprovalStatus:"Approved", you should use formula like this:

    ForAll(
     RenameColumns(
     Filter(
     GalleryReported.AllItems,
     ApprovalStatus = "Reported"
     ),
     "ID","ID1"),
     Patch(
    Mobility,
    ID=ID1,
    {ApprovalStatus:"Approved"}
    )
    )

    If Status is single choice column, try this formula:

    ForAll(
     RenameColumns(
     Filter(
     GalleryReported.AllItems,
     Status.Value = "Reported"
     ),
     "ID","ID1"),
     Patch(
    Mobility,
    ID=ID1,
    {Status: {Value: "Approved"}}
    )
    )

     

     

     

    Best regards,

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard