Forum Discussion
Warwick Ward
Apr 06, 2022Bronze Contributor
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 something like classic Change query worked...
{searchbox} Department={User.Department}
- 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
- Warwick WardBronze ContributorLooks 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