1

Our SharePoint tenant is host to multiple Client sites, all of which are structured more or less the same and with access to each Client site given to ourselves and the respective client. Each site also contains a Document Library named Jobs, with a column named 'Job Description', as well as a few others, and whenever a Client has a job come in they're to create a folder in the 'Jobs' library, and detail the specifics in the columns.

As a means of making sure this is being done I've been looking into using the Highlighted Content Web Part so as to bring in all the new Jobs that are being created all over our tenant - I currently have it set to a List view, and for the most part this works and I can see Title, Modified, and Modified By details of each list item being created or edited, however ideally I'd like to get the 'Job Description' column from the folders into here as well? I know you can create a column in highlighted content through JSON, but I wasn't sure if this would also pull in the the actual text in the column as well, or if I'd have to use CAML or something else to do that. Is this at all do-able, and if so how?

Any help would be appreciated - Thank you!

0

Per my knowledge, it cannot be done in modern experience to show additional columns for highlight content web part.

You can accomplish it somehow by creating your own SPFx webpart. There is already one seems to have a pretty good toolset similar to old Content Query webpart here. Take a look at it:

https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-content-query-webpart

And you can vote in user voice for MS to consider about the new feature

0

Having had a play around - it is doable, just a little awkward.

Essentially you need to first add the Highlighted Content Web Part to your page, then extract the PNP Provisioning Template, open it in your favourite text editor, scroll through till you get to and ContentRollup. Take a look at the JSONControlData attached to ContentRollup and you'll eventually come to "displayMaps", which has 4 objects; a little deduction and we can see that it refers to the 4 layouts offered by Highlighted Content - Grid (1), List (2), Carousel (3), Filmstrip (4) (However, as far as I can tell only the List option allows adding any additional columns). Find 2 (List) and we can see that it has 4 different columns - FileType, Title, ModifiedDate and ModifiedBy, and this is where we can alter or remove these, and add new ones if we wish.

When it comes to pulling data in from another column in another list/library, you basically just need to change the "Sources" of the ContentRollup List columns, which you can do in the JSONControlData; if you look at column1 it's got a header of "Title", with a source of "Title" which refers to the name of the managed property - every item will have a this title property so as such it'll be able to generate this in the ContentRollup. In my case, I had to add in a new column, with a title of "Job Description", and a source of "JobDescriptionOWSTEXT" which referred to the list column of the same name in my "Jobs" Document Library. Afterwards just apply your PNP template again, once I did this and added an item to my document library it then popped up in my content rollup showing the title of the item, the job description I'd typed in for it, as well as the modified and modifiedby info.

ContentRollup List

Hopefully this all makes sense!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.