Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Passing value [0] to DefaultSelectedItems ComboBox, and ComboBox search issues.

I have a PowerApps screen that loads values from a collection into a series of ComboBoxes. DefaultSelectedItems in each ComboBox is based off the following:

[LookUp(TodaysWorkout, ID = WorkoutItemVar, SetWeight10)]

TodaysWorkout is the collection I'm looking up from, ID is a unique identifier for each item in the table, WorkoutItemVar is the variable set to the specific item ID I want to edit, and SetWeight10 is the value I want to make available for editing (or not) by the ComboBox. The enclosing brackets must be included for it to work, and it works like a charm with every single value that is passed to it except for 0. Even though 0 is an item available in the ComboBox, it refuses to allow that item to be selected by default. Users can pick it manually just fine. So, if values are 20 or 150 or any others numeric values available, it loads them as default selected. If 0 is the value, users instead see a blank ComboBox.

I wouldn't be so bothered by this behavior if it weren't for the fact that if the ComboBox doesn't have a legitimate default value, the items you can select from aren't searchable. If you select an item manually, then remove that selected item (making it blank again), the ComboBox is magically searchable.

It all seems to come down to the fact that any number if enclosed in [ ] makes DefaultSelectedItems happy, except 0. Now if I force DefaultSelectedItems to be ["0"], it's happy but I can't put quotes in and expect my LookUp to work. I tried using Char(34) inside the braces like so:

[Char(34)&LookUp(TodaysWorkout, ID = WorkoutItemVar, SetWeight10)&Char(34)]

but all that does is make the default selected item read as "0" including the quotes, which would be funny if it weren't so frustrating.

I'm pretty new to PowerApps so I wouldn't be surprised at all if I'm doing something ridiculous. Any advice would be much appreciated.

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.


Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 63 members 3,914 guests
Please welcome our newest community members: