Forum Discussion

Ainzo92's avatar
Ainzo92
Copper Contributor
Sep 16, 2022

PNP Modern search webpart

Hi guys,

 

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

 

Thank you.

  • Petsku-GrepIT's avatar
    Petsku-GrepIT
    Copper Contributor

    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.

Resources