@arinard - one comment here after advising you on your other post.
https://powerusers.microsoft.com/t5/Building-Power-Apps/If-statement-with-multiple-conditions/td-p/2673865
A data source returns a table. And a Choice field also returns a table. Irrespective of where it comes from, a table is still a table, and specific attributes can be modified in the same way as any other control which returns a table.
If you modify the Choices field in the Dropdown items property to return a custom value, the items in that Dropdown will no longer return a valid record. However, so long as you're not using the modified Dropdown to save the selected choice to your data source, and you simply want to use the modified Dropdown for filtering the Local Choice field in your Dataverse table, this is possible.
However, you will need to ensure the Items property in the Dropdown, and the Choice field in your data source, share the same data type to produce a valid Filter. In your scenario, we want the Items in the Dropdown, and the Items in your data source, to both return a text data type rather than a record data type.
https://learn.microsoft.com/en-us/power-platform/power-fx/data-types
You will need to use the AddColumns function to "transform" or "shape" the Choices field in your data source as a duplicate column, but as a text data type, rather than a record data type. You will need to apply this function in both the Items property of the Dropdown control, and in the Items property of the Gallery.
In the Items property of your Dropdown control, use:
Ungroup(
Table(
{DropdownOptions: ["All"]},
{
DropdownOptions: RenameColumns(
ShowColumns(
AddColumns(
Choices('Shoe Inventory Finals'.Color),
"_ChoiceText",
Text(Value)
),
"_ChoiceText"
),
"_ChoiceText",
"Value"
)
}
),
"DropdownOptions"
)
In the Items property of your Gallery, use:
Filter(
AddColumns(
'Shoe Inventory Finals',
"_ChoiceText",
Text(Color)
),
Len(drpColor.Selected.Value) = 0 || drpColor.Selected.Value = "All" || _ChoiceText = drpColor.Selected.Value
)
Now that both the selected item in your dropdown, and the field you want to filter on are the same data type (text), this will produce a valid filter.
Please note however, that the UnGroup and AddColumns functions are not delegable.