cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Model Driven App Filtering On Null

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (3,100)