Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Patching Choice column, Expected type: Record. Found type Text

(0) ShareShare
ReportReport
Posted on by 909 Super User 2024 Season 1

Hi,

 

final conclusion is a choice column in my SP list.

This is on the OnSelect property of the button.

The button name is 'submit_new_conclu' 

wonka1234_0-1696431754440.png

 

can anyone help with this?

  • Chris-D Profile Picture
    1,246 on at
    Re: Patching Choice column, Expected type: Record. Found type Text

    ok. Since you're patching ThisItem, I'm assuming it's in a gallery. I'm also assuming that the dropdown has a default of ThisItem.'Final Conclusion'.


    What I think is happening is that your Patch() is updating the SP list, but your gallery is based on a collection. The collection your gallery is based on won't update, you'll need to refresh this after your Patch().

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Patching Choice column, Expected type: Record. Found type Text

    @Chris-D  on its own.

  • Chris-D Profile Picture
    1,246 on at
    Re: Patching Choice column, Expected type: Record. Found type Text

    Is the dropdown in a data card in a form or on its own? 

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Patching Choice column, Expected type: Record. Found type Text

    @Chris-D  thanks it worked!! however one issue is my dropdown is defaulting to a value and not the newly dropdown submitted value.

     

    How can i fix this?

     

    my items property is - Choices([@'Data Source'].'Final Conclusion')

  • Verified answer
    Chris-D Profile Picture
    1,246 on at
    Re: Patching Choice column, Expected type: Record. Found type Text

    So you need to modify this slightly, to get the value from a dropdown you need to use the Selected property:

    Patch(
     Data Source, 
     ThisItem, {
     // use Dropdown.Selected.FieldName to get the selected item
     // In a list of single values use the 'Value' field name
     'Final Conclusion': 'final conclusion dropdown'.Selected.Value
     }
    )

     

    If you are patching to a choice column, you'll need to do as I said before and change this into a single value record:

    Patch(
     Data Source, 
     ThisItem, {
     // use Dropdown.Selected.FieldName to get the selected item
     // In a list of single values use the 'Value' field name
     // Use a single value record to patch a choice column
     'Final Conclusion': { Value: 'final conclusion dropdown'.Selected.Value}
     }
    )

     

    Hopefully that'll work for you one way or another. 

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Patching Choice column, Expected type: Record. Found type Text

    @Chris-D  I think i messed up my question.

     

    Patch('Data Source, ThisItem, {'Final Conclusion': 'final conclusion dropdown' })

     

    the first final conclusion is the field in the SP list, the one after : is referring to my dropdown. I want to change the SP list based on the dropdown value.

     

    When I do it , no error but the dropdown doesnt change at all.

  • Chris-D Profile Picture
    1,246 on at
    Re: Patching Choice column, Expected type: Record. Found type Text

    A choice column is actually stored as a record with a single value. You can update it with:

    { Value: "My Text"}

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard