سؤال

Can we use the listview command set extension to change the format of the view or column in SharePoint online? If yes, how?

And is there any other way to create a template like feature for this? Probably a REST API to call in which we send the JSON object and list name ant it gets applied to the list?

Actually I want to create a type of template or something, clicking on which, the predefined JSON object would be used to change the view or column.

هل كانت مفيدة؟

المحلول

I did this few days back, I created a command set customizer extension to create two buttons.One to customize the fields and another to customize the view. I stored some JSONs in different files. and displayed dropdown to select between the JSONs. Then After that I was needed to replace the fields name to the available fields. To do that, I kept variable names in JSON and during the sending of the JSON to API, I replaced the filed names with the original selected field name.

I sent the JSON in the attribute "CustomFormatter" and used the merge REST API. And it worked.

On right side the panel opens up on clicking the customize field button

On clicking any field, the JSON selection dropdown is shown.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top