cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rixmcx
New Member

Filter query "column ne null" not working as expected with multiple OR operator

Hello all, I have an email address column that uses the formatting below to convert it to a live email

{ "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "debugMode": true, "elmType": "div", "children": [{ "elmType":"a", "txtContent":"@currentField", "attributes":{ "href":{ "operator":"+", "operands":[ "mailto:", "@currentField" ] } } }] }\

in the grid view there is a failure message when there is no email, in a standard view it's empty

 

When I try to add the filter query; email ne null to my filter I get different results, when I place it at the end it's ignored when I place it at the beginning it removes 3 of the 11 nulls.

substringof('Director',Title) or substringof('Secretary',Title) or substringof('General',Title) or substringof('State',Title) or substringof('Officer',Title) or substringof('Commissioner',Title) or substringof('Chairperson',Title) or substringof('Chancellor',Title) or substringof('Controller',Title) or substringof('Chief',Title) or substringof('Lieutenant Governor',Title) or substringof('President',Title) or substringof('Superintendent',Title) or substringof('Undersecretary',Title) or substringof('Acting',Title) and field_E_x0020_MAIL_x0020_ADDRESS ne null

 

thanks for any help, the nulls may not even be a problem since the variable is being used in the cc line of an email

1 ACCEPTED SOLUTION

Accepted Solutions
Rixmcx
New Member

substringof('Director',Title)and field_E_x0020_MAIL_x0020_ADDRESS ne null or substringof('Secretary',Title) and field_E_x0020_MAIL_x0020_ADDRESS ne null or substringof('General',Title)and field_E_x0020_MAIL_x0020_ADDRESS ne null

Thw working filter query

View solution in original post

3 REPLIES 3
Rixmcx
New Member

The answer came to me while posting this, it was very simple. I needed to add the "and field_E_x0020_MAIL_x0020_ADDRESS ne null" to each one of the OR's. Maybe not the most elegant solution but it works.

v-xiaochen-msft
Community Support
Community Support

Hi @Rixmcx ,

 

Glad to see you solved the issue.

You could mark your own reply as a solution.

 

Best Regards,

Wearsky

Rixmcx
New Member

substringof('Director',Title)and field_E_x0020_MAIL_x0020_ADDRESS ne null or substringof('Secretary',Title) and field_E_x0020_MAIL_x0020_ADDRESS ne null or substringof('General',Title)and field_E_x0020_MAIL_x0020_ADDRESS ne null

Thw working filter query

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,268)