PNP Modern search webpart

Copper Contributor

Hi guys,

 

Does anubody know how to filter out user profiles with empty firstName in the modern search webpart?

 

Thank you.

1 Reply

@Ainzo92 You can't directly filter out empty/null values. As an ugly workaround You can try -> set modern search result web part Query Template:  {searchTerms} AND (firstName:A* OR firstName:B* OR firstName:C* .... OR firstName:Z*) i.e. loop thru all alphabets. My quick test for this solution worked.