cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tushar18
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

3 REPLIES 3
mdevaney
Level 8

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

@Tushar18 

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."

v-siky-msft
Level 10

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.

Capture.PNG

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

Best regards,

Sik

Tushar18
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.

Filter(DataSource,ItemId=CBItemID.Selected.Result,Site=CBSiteID.Selected.Result,LocationId=CBLocationID.Selected.Result)

All CB means combobox.

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

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 437 members 5,346 guests
Please welcome our newest community members: