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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,147)