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

object reference not set to an instnace of object in dropdown/combo box

Just to simplify let's suppose I'm using two combo boxes:
1. itemId

2. ItemlocationId


ItemLocationId depends on Item Id.

It's items tab is as follows: Distinct(Filter(Sums, ItemId = CBItemID.Selected.Result),InventLocationId)


It works perfectly fine but gives this error :

The requested operation is invalid. Server Response: An error is occoured. Object reference not set to an instnace of object.


I have multiple combo boxes depending on ItemId throwing the same error.

App works fine on pc and gives results. And we can ignore the error messages popping up on the top.

But on phone it becomes a mess because whole screen fills up with same error until I clear them upCapture.PNG

Super User
Super User

Re: object reference not set to an instnace of object in dropdown/combo box


I find the this part of your code odd.  See what I have highlighted in blue?


Distinct(Filter(Sums, ItemId = CBItemID.Selected.Result),InventLocationId)


From what I can tell you are trying to Filter() on ItemId but you are matching you a column called Result.  That doesn't seem correct.  You should be putting the ItemId field from your CBItemID gallery here instead (assuming CBItemID is a gallery).


Distinct(Filter(Sums, ItemId = CBItemID.Selected.your_itemid_column_name),InventLocationId).Result


Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Microsoft v-siky-msft

Re: object reference not set to an instnace of object in dropdown/combo box

Hi @Tushar18 ,


Can you share some expressions of Items property of 'ItemID' combo box?

Is the CBItemID the name of ItemID Combo box? Did you also apply Distinct function to its item property? 

Is there any other formual applied to your app?


I have made a test on my side according to your description, and don't have the same issue you mentioned.


Can you confirm that if there is any other formulas may casue issue?

Best regards,


Level: Powered On

Re: object reference not set to an instnace of object in dropdown/combo box

Thanks for the reply.


1. CBItemId is combobox which lets us choose Item ID.

2. Accordingly Location is chosen based on selection of ItemId:


Distinct(Filter(DataSource, ItemId = CBItemID.Selected.Result),LocationId)

3. Also there's a gallery which filters data from 3 combobox selections namely ItemId, LocationId and SiteID.


All CB means combobox.

There's a deligation warning as well but I'm ignoring that too.


Helpful resources


Power Apps Super User Class of 2020

Check it out!


New Badges

Check it out!


Power Apps Community User Group Member Badge

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


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,116)