PnP Modern Search - Use Users Department in Query

Bronze Contributor

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 something like classic Change query worked...


{searchbox} Department={User.Department}

1 Reply
best response confirmed by Warwick Ward (Bronze Contributor)
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

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

the above works now with the " " in place