cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jonfarmer4999
Level: Powered On

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
Community Support Team
Community Support Team

Re: Model Driven App Filtering On Null

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
Community Support Team
Community Support Team

Re: Model Driven App Filtering On Null

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
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 (Last 30 Days)
Users online (5,441)