1

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

2

Solution:

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

enter image description here

1
  • Thanks for your help ! Commented Jan 2, 2020 at 9:03
1

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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.