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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (3,174)