Forum Discussion

OldWarwick's avatar
OldWarwick
Bronze Contributor
Apr 05, 2022
Solved

PnP Modern Search - Use Users Department in Query

The idea is to create a view of a list via search which will only shows results where Department column in list = current user's Department.   Is something this possible??   Was thinking somethin...
  • OldWarwick's avatar
    Apr 06, 2022
    Looks like the above tokens do work in PnP Modern Search - I just need modify it a bit, using the debug view allowed me to nail it down

    https://microsoft-search.github.io/pnp-modern-search/usage/search-results/tokens/

    {searchbox} Department="{User.Department}"

    the above works now with the " " in place