SOLVED

Filter column lookup with JSON

Copper Contributor

Hi everyone, I need help how to filter with lookup column which is on first list (Marketing Catalog) using JSON Script, and on second list (catalog order) using lookup column to join it.

And i want only status active is only show on second list (Catalog Order), can anyone help me?

I attach my picture for more detail

Thanks Active Catalog.png

3 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution

@lucasignatius 

 

You cannot filter list views using JSON formatting. You need to edit your list view and apply necessary filters based on lookup column.

 

Check this documentation: Use filtering to modify a SharePoint view 

 

But for your case, In order to filter the 2nd list based on Status column, you should have the data (Active/Non Active) stored in column (Status), which is not possible using JSON formatting. 

 

Workaround:

  1. Go to 2nd list settings. In lookup column settings, select StartDate and EndDate under "Add a column to show each of these additional fields" section.
  2. Add necessary filter conditions based on StartDate and EndDate (Use [Today] to get today's date in filter conditions).

Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

@ganeshsanap 

Hi, can you give me more detail with screenshoot because I've problem when add [TODAY] on StartDate

Thanks for your help

@lucasignatius 

 

Add list view filters something like below:

View filters.PNG


If the post is useful, please consider giving it Like.

 

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

@lucasignatius 

 

You cannot filter list views using JSON formatting. You need to edit your list view and apply necessary filters based on lookup column.

 

Check this documentation: Use filtering to modify a SharePoint view 

 

But for your case, In order to filter the 2nd list based on Status column, you should have the data (Active/Non Active) stored in column (Status), which is not possible using JSON formatting. 

 

Workaround:

  1. Go to 2nd list settings. In lookup column settings, select StartDate and EndDate under "Add a column to show each of these additional fields" section.
  2. Add necessary filter conditions based on StartDate and EndDate (Use [Today] to get today's date in filter conditions).

Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

View solution in original post