Show or hide columns in a list or library form
Conditionally show or hide columns in a SharePoint list By in SharePoint, SharePoint Online on August 17, 2021September 7, 2021 No comments 2,987total views, 6views today Show
In this conditionally show or hide columns in a SharePoint listarticle, we will learn how to show or hide columns conditionally in the SharePoint list form. Conditionally show or hide: what you will learn from this article?
In order to complete this demo, we need to have a Sharepoint list. Here is the demo list, named Expense Claim Below attached the list definition. Along with the IsApproverNeeded(Yes/No type) and Approver Name (People/Group type) it has some other columns, however, here we are interested only in these two columns. The demo output would be as, if the user selects IsApproverNeeded then only the Approver Name column will be displayed otherwise would be hidden. Now, lets get started with the demo. Show Hide Columns conditionally in SharePoint list form demoWe have the SharePoint Online list ready with sample data. Show Hide Columns conditionally demo with the sample SharePoint listClick on the Title column hyperlink to open the list view form. Then, the list item will be opened in the list view form. Click on the Edit Form (3) dropdown list as shown in step 3. Click on the Edit columns link. Edit columns in Online SharePoint modern list formClick on the three dots next to the column name for which you want to apply the formula. Here we have selected ApproverName as we want to hide and show this column based on the other column values changes (IsApproverNeeded Yes/No). Edit columns formula in modern SharePoint Online listClick on the Edit conditional formula link. Edit conditional formula in modern SharePoint Online listEnter the below text in the edit conditional formula box: =if([$IsApprovalNeeded]==true,'true','false')Edit conditional formula for SharePoint fieldClick on the Save button. Explanation about the above formula: conditionally show or hide column
Conditionally show or hide: what can be done using the conditional formula?
Show and hide column conditionally in SharePoint Online list Demo:Open the list item in edit mode. We can notice that by default IsApprovalNeeded is unchecked, so we cannot see the Approver Name column it is hidden. Open SharePoint list form in edit mode to show and hide the columnNow, click on the IsApprovalNeeded checkbox, then we can see that the Approver Name column is being shown, and if we uncheck this selection Show and hide the column in SharePoint list form conditionally demoNote:
Lets check out the above limitation practically. Make the ApproverName column as Require that this column contains information and click on the OK button. Make existing column as required in SharePoint OnlineEdit conditional formula in modern SharePoint Online list is hidden when the column is required: Now, go again to the edit columns in the form configuration, and select the ApproverName column, we can notice that the Edit conditional formula is hidden now, only we can see the Move up option because we have made this column as a required. Edit conditional formula in modern SharePoint Online list is hidden when the column is requiredWorking with various types of columns in SharePoint Online list for conditional formulas:
Note:
We even can add/subtract the value of fields before comparing, below is the example: =if([$Column1]+[$Column2]<3000,'true','false')Logical operators in the conditional formula in SharePoint Online listLogical operators are also allowed inside the conditional formula in SharePoint online list.
Limitation column types not supported in conditional formulas in SharePoint list/library:As of today, below list of columns is not supported in the conditional formula in the SharePoint list.
Summary: What we had here?Thus, in this article we have learned the below with respect to show and hide column conditionally in SharePoint Online list form:
See Also:You may also like the below SharePoint/PowerApps article:
Buy the premium version of SharePoint Online & Office 365 administration eBook from here:Share this:
Like this:Like Loading... RelatedTags: Conditional formula to show or hide columns, Conditionally show or hide columns in a SharePoint list, SharePoint conditionally hide form fields, SharePoint list conditional fields, SharePoint required field conditional, Show or hide columns conditionally in SharePoint list or library form, Show or hide columns in a list or library form, Unsupported column types in conditional formulas Post navigationPrevious postCreate your own chatbot in PowerApps step by step Next postUse PowerApps in outlook: Launch outlook from PowerApps You must log in to post a comment. |