Search code examples
jsonsharepoint

Sharepoint list hide/unhide based on new item input


I am creating a sharepoint list and want to show/hide items at the time the users adds a new item based on his selection. For instance, if a column has a yes, hide the next two columns as user input won't apply.


Solution

  • You can use SharePoint conditional formulas to show/hide list form fields conditionally based on other fields.

    For example:

    You have 3 columns in your SharePoint List:

    1. Category - Choice column
    2. Start Date
    3. Flights Cost

    and you want to show "Start Date" and "Flights Cost" columns only when Category is equal to "Product Management". Then you can add conditional formula for your "Start Date" and "Flights Cost" columns like:

    =if([$Category] == 'Product Management', 'true', 'false')
    

    Where Category is the internal name of your choice column. You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?

    Check this Microsoft official documentation for more examples and steps explaining where to add the SharePoint conditional formulas: Show or hide columns in a SharePoint list or library form