Forum Discussion

Anna-pcm's avatar
Anna-pcm
Copper Contributor
Dec 04, 2023

Showing/hiding specific rows based on Where conditions in Sharepoint lists (online)

I am new to Sharepoint Online and I can't find any references online on how to show/hide rows in sharepoint list with where conditions.

 

For example, I have a list of customer issues.

Scenario:

A customer reports an issue with a lost cell phone.

A customer service rep, which only deals with lost and found customer issues, has logged into the system to see all 'lost and found' issues.

Question:

Is it possible to set a simple condition that shows data/rows in sharepoint list 'Where IssueType = Lost and Found"?

 

Thank you in advance for your help!

  • Anna-pcm you need to start learning about Views as these filter your list by criteria that you determine.

     

    So if you want a view that shows just Lost items click the dropdown in the top right of the list where it says All items and select New View:

     

     

    Give your view a name - I should have called this Lost but was too eager with the typing!

     

     

    Click the dropdown again where your new view is now listed and select Edit current view:

     

    This will take you to the List settings screen for your view:

     

     

    Scroll down to the Filter section and click the radio button that says Show items only when the following true, so I've selected the column LostFound is equal to Lost. Then scroll down to the bottom of the screen and click OK:

     

    This will be the result:

     

     

    You could then create another view for Found.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP (and classic 1967 Morris Traveller driver)

  • Hello Anna-pcm

     

    you can create views with different conditions to show the related elements:  https://support.microsoft.com/en-us/office/use-filtering-to-modify-a-sharepoint-view-3d8efc52-0808-4731-8f9b-3dfaeacea3d4?WT.mc_id=DX-MVP-5004845

     

    If not everyone is allowed to see everything, you must use element authorizations: https://learn.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/guidance/manage-list-item-file-permissions?WT.mc_id=DX-MVP-5004845

     

    You can show/hide columns in list forms with conditions:

    https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-conditional-show-hide?WT.mc_id=DX-MVP-5004845 

     

    Hope, one of the option help in your case. 

     

    Best, Dave

  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    Anna-pcm you need to start learning about Views as these filter your list by criteria that you determine.

     

    So if you want a view that shows just Lost items click the dropdown in the top right of the list where it says All items and select New View:

     

     

    Give your view a name - I should have called this Lost but was too eager with the typing!

     

     

    Click the dropdown again where your new view is now listed and select Edit current view:

     

    This will take you to the List settings screen for your view:

     

     

    Scroll down to the Filter section and click the radio button that says Show items only when the following true, so I've selected the column LostFound is equal to Lost. Then scroll down to the bottom of the screen and click OK:

     

    This will be the result:

     

     

    You could then create another view for Found.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP (and classic 1967 Morris Traveller driver)

    • Anna-pcm's avatar
      Anna-pcm
      Copper Contributor

      Hi Rob_Elliott and thank you so much for your help!

       

      Is there any way to do the filtering without creating two lists? I mean, the customer issues list will have different types of issues, such as "lost and found", "refunds", "returns" and so on.

      And let's put it this way: each type of issue has a corresponding department to solve the customer issues.

       

      Scenario:

      1. An employee who belongs to the "Lost and Found" department logs into the system and see all customer issues for all 'lost and found' items.

      2. An employee who belongs to the "Refunds" department logs into the system and see the list of customer issues for all issues with "Refunds".

       

      So.. basically all departments will be working on the same list, but the data shown will vary depending on the logged in Employee Department and the type of issue the employee is assigned to. Is there a possibility to filter the list like this?

       

      I hope I explained my problem well. 

       

      Thank you in advance for your help. 😊

      • Rob_Elliott's avatar
        Rob_Elliott
        Bronze Contributor

        Anna-pcm you're not creating 2 lists! It's just one list with different views showing the items you want in each view, for example a view for all lost items , a view for all found items, the default all items view and so on. Just 1 list.

         

        Rob
        Los Gallardos
        Microsoft Power Automate Community Super User.
        Principal Consultant, SharePoint and Power Platform WSP (and classic 1967 Morris Traveller driver)

         

Resources