NEVER give your SharePoint fields the displayname of Value!

After an hour of banging my head against a brick wall when my Patch command failed I found the issue with a field named Value.
Value
It is not uncommon to call a field Value inn SharePoint. For example when you want to keep track of the Value of products you might think that Value is a good name. But it is not if you use Power Apps in combination with SharePoint.
The word Value is a reserved word in Power Apps as you might have found before. But what if your datasource uses a field called Value? Will things get confused?
Today I tried the following code:
Patch(
'Gift, Hospitality and Donation Register',
Defaults('Gift, Hospitality and Donation Register'),
{
TSTType: {
Value: First(cmbType.SelectedItems).Value
},
TSTValue: 123
}
)
All looks good but Power apps is complaining that something is missing with the following warnings:

When you search for the above warnings your will end up on community posts where people have used the wrong syntax or when they are doing something else wrong. Or on my post about patching any type of field.
Fixing the column name
But to make matters worse! When you update the list’s column display name to for example Amount and then update your datasource. You will find that Power apps is trying to be very helpful! And all your “Value:” bits in your code will be updated.

Recommendations
So my recommendation:
Never call your fields Value. And that includes the displayname of a column. Well that is until Microsoft fixes this issue.
Continue Reading Pieter Veenstra’s Article on their blog
NEVER give your SharePoint fields the displayname of Value!
After an hour of banging my head against a brick wall when my Patch command failed I found the issue with a field named Value. It is not uncommon to call a field Value inn SharePoint. For example when you want to keep track of the Value of products you might think that Value is a good name.
Blog Syndicated with Pieter Veenstra’s Permission
More About This Author
Array
ModernWorkplace2022.07.01Return Arrays from Power Automate to Power Apps without a premium licence
ModernWorkplace2022.06.30Display the environment name in your Canvas App in Power Apps
ModernWorkplace2022.06.27Create custom content instead of components in Power Pages
ModernWorkplace2022.06.27Style your Power Pages, the easy way