web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / object reference not s...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 22

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

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @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 Profile Picture
    Microsoft Employee on at

    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 Profile Picture
    22 on at

    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.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard