Patching SharePoint Choice columns from PowerApps using 'Value'

 

Copilot Prompt

How do I patch a SharePoint choice column using a String in PowerApps?

A quick PowerApps tutorial today. This is something that seems like it should be quite simple, but trips a lot of people up.

It seems logical that you should just be able to patch the choice column with whatever string matches the choice your trying to select. For example:

Patch(
	YourList,
	Defaults(YourList),
	{
		YourChoice: "Choice 1"
	}
)

However a choice needs you to patch a record, stating the ‘Value’, instead of just a string:

Patch(
	YourList,
	Defaults(YourList),
	{
		YourChoice: {Value: "Choice 1"}
	}
)

If you’re using a dropdown or combo box within your app, you can reference it directly:

Patch(
	YourList,
	Defaults(YourList),
	{
		YourChoice: Dropdown_choice.Selected
	}
)

Popular posts from this blog

Book Review - Get Everything Done and Still Have Time to Play

Base64 Encoding Images in PowerShell