Forum Discussion

ConstantinLotz's avatar
ConstantinLotz
Copper Contributor
Feb 26, 2023
Solved

Site Columns created by PNP Powershell not showing up in Highlighted Content Webpart

Hi there, i'm getting stuck in creating some custom colums for the "Site Pages" library - to deploy some colums automatically.   I can create collumns by pnp like this:   $siteurl = "https://do...
  • SvenSieverding's avatar
    Feb 26, 2023

    Hi ConstantinLotz 


    Your code works.

    After line 5 you have a "single user field" that correctly shows up in the "Highlighted Contents" webpart.
    But after you switch that webpart to a "multi user field" it stops showing up in the "Highlighted Contents" webpart.

    A "multi user field" did not show up in the "Highlighted Contents" webpart even if i created it manually, so i think that that webpart does not support "multi user fields".

    But in this case you can alternatively just ditch the "Highlighted Contents" webpart and use a normal "Document library" webpart instead. Here you can filter by "multi user fields".
    If you don't like the "List"- or "Tile"- Layout, then you can apply a JSON List formatting like this "https://github.com/pnp/List-Formatting/tree/master/view-samples/document-library-gallery-card"

    Best Regards,
    Sven

Resources