none
Creating a filter + distinct in SharePoint Online with JSON? RRS feed

  • Question

  • I am currently working on a sharepoint list. I would like to change the view report, that there are no duplicates for the region, and that always the last entries of a region are displayed. But so far i only see some solutions with ajax.

    SO my question is, if it´s also possible to do this directly online in the box with JSON to format it like I described it?

    Best Regards, 

    BS10!

    Tuesday, January 28, 2020 6:27 AM

All replies

  • Hi,

    View formatting does not change the data in list items, it only changes how they're displayed to users who browse the list. Please check the official document here: Use view formatting to customize SharePoint

    As a workaround, we can switch to the classic view and use JSLINK to achieve your reference. The following article for your reference.

    Displaying list with only unique values in title column

    Or we can create custom SPFx web part and use the REST API to filter the data.

    SharePoint Framework Client-Side Web Part Samples & Tutorial Materials

    Best regards,

    Dennis 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, January 28, 2020 9:33 AM
    Moderator
  • So it´s not possible to use JSON online for filtering and distinct items in the list?
    Tuesday, January 28, 2020 9:47 AM
  • No, This is not possible using JSON View formatting.

    In View formatting, you cannot access the column values from another list item/row.

    You can only access the column values from the same list item/row like  [$AnotherColumnFromSameRow].

    Where AnotherColumnFromSameRow is internal name another column from same list item/row.

    --------------------------------------------------------------------------------------------

    Please Vote(^) and accept it as an answer if it helped you.



    • Proposed as answer by Ganesh_Sanap Wednesday, January 29, 2020 6:07 AM
    Tuesday, January 28, 2020 1:59 PM
  • I´m a bit confused. I wanted to filter the last entry for a region and distinct the region so that in the columm will be no duplicate items. But that´s not possible online in the JSON box online right?
    Tuesday, January 28, 2020 2:31 PM
  • Hi,

    Yes, it is not possible to achieve your requirements using JSON formatting currently. View formatting does not change the data in list items. Please check my workaround.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, January 29, 2020 2:44 AM
    Moderator
  • Thanks for the help!
    Wednesday, January 29, 2020 6:02 AM
  • Hi,

    If the replies help you, please mark the reply as answer, it will make others who stuck with the similar issue easier to search for valid solutions in this forum.

    Best regards,
    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, January 29, 2020 6:43 AM
    Moderator