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 / Patching Choice column...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 920 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?

Categories:
I have the same question (0)
  • Chris-D Profile Picture
    1,246 on at

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

    { Value: "My Text"}
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @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.

  • Verified answer
    Chris-D Profile Picture
    1,246 on at

    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
    920 Super User 2024 Season 1 on at

    @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')

  • Chris-D Profile Picture
    1,246 on at

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

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @Chris-D  on its own.

  • Chris-D Profile Picture
    1,246 on at

    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().

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard