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'
can anyone help with this?
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().
Is the dropdown in a data card in a form or on its own?
@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')
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.
@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.
A choice column is actually stored as a record with a single value. You can update it with:
{ Value: "My Text"}
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional