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 / Model Driven App Filte...
Power Apps
Answered

Model Driven App Filtering On Null

(0) ShareShare
ReportReport
Posted on by 119

I am writing a PA to show Dynamics opportunities and associated lines. As we use Bundles I only want to show the bundle line and not the associated bundle lines. To do this I am attempting to filter on the parentbundleid field and only return records where there is no data in that field. I have tried IsBlank(), IsEmpy() and parentbundleid = Blank(). Each time the filter returns no records even though there are records which are not part of a bundle. My full Filter is below. 

 

Filter('Opportunity Lines',Opportunity.'Opportunity ID' = ModelDrivenFormIntegration.Item.'Opportunity ID', IsBlank('Parent Bundle'))

 

If I remove the second clause from the filter then the correct number of records is returned. 

 

Anyone know why this isn't working?

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Jonfarmer4999 ,

    Are there some records whose 'Parent Bundle' column is Blank existed in your 'Opportunity Lines' Entity?

     

    Based on the formula you provided, I could not find any syntax error with it. Please make sure there are some records whose Parent Bundle' is Blank and the Opportunity column is related to the selected Opportunity in your form existed in your 'Opportunity Lines' Entity.

     

    Please also consider take a try with the following formula within your app:

    Filter(
     'Opportunity Lines', 
     IsBlank('Parent Bundle')
    )

    then check if there are records could be returned.

     

    Actually, the Dynamics CRM Entity is based on the CDS Entity within same PowerApps Environment (D365 instance), you could consider add corresponding CDS Opportunities and Opportunity Lines Entity as data source in your app instead of your original D365 CRM Entity. Then try your above Filter formula again, check if the issue is solved.

    Please also consider modify your formula as below:

    Filter('Opportunity Lines',Opportunity.'Opportunity ID' = ModelDrivenFormIntegration.Item.'Opportunity ID' && IsBlank('Parent Bundle'))

     

    Best regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard