I need to retrieve view ID (or Name) to format a SharePoint list column with JSON formatting.

Or at least I should be able get the correct query parameter of the URL.

Is there any variable available to do so ?

(I don't want to use a SPFX column extension).

2 Answers 2



Create SPFx Field Customizer so you could get the view id by this.context.pageContext.legacyPageContext

enter image description here

  • Thanks for your help !
    – Héloïse
    Jan 2, 2020 at 9:03

Short Answer to your question is No.

Currently there is no variable/function available to get the current View ID/Name while using JSON formatting on column.

For more information on column formatting, check below documentation:

Use column formatting to customize SharePoint.

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.