You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/declarative-customization/list-form-conditional-show-hide.md
+28-26Lines changed: 28 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -1,53 +1,53 @@
1
1
---
2
2
title: Show or hide columns in a list form
3
-
description: Customize which columns to show or hide using a conditional formula in the list form by constructing a simple formula that are equations performing conditional checks on values in a SharePoint list or library.
4
-
ms.date: 03/16/2020
3
+
description: Customize which columns to show or hide using a conditional formula in the list form by constructing a simple formula that are equations performing conditional checks on values in a SharePoint list or library.
4
+
ms.date: 04/30/2020
5
5
localization_priority: Priority
6
6
---
7
7
8
8
# Show or hide columns in a list or library form
9
+
9
10
You can show or hide columns in a list or library form as an alternative to deleting them. When you hide a column, it doesn't affect the column or the data in the column, as it would if you deleted it. To re-use the column, you can simply show it again in the form.
10
11
11
12
To show or hide a column in a list or library form:
12
13
13
14
1. Go to the list or library for which you want to show or hide columns in the form.
15
+
1. If you are in a list:
14
16
15
-
2. If you are in a list:
16
-
17
-
- Open an item to view the item details in the display form.
17
+
- Open an item to view the item details in the display form.
18
18
19
-
3. If you are in a document library:
19
+
1. If you are in a document library:
20
20
21
-
- Select a file.
22
-
- In the **Information Pane**:
23
-
- Locate the **Properties** section.
24
-
- Click **Edit all**.
21
+
- Select a file.
22
+
- In the **Information Pane**:
23
+
- Locate the **Properties** section.
24
+
- Click **Edit all**.
25
25
26
-
4. At the top of the form, select **Edit Form > Edit columns**.
26
+
1. At the top of the form, select **Edit Form > Edit columns**.
27
+
1. In the **Edit columns** pane, check (to show) or uncheck (to hide) the box for the column or columns as needed.
27
28
28
-
5. In the **Edit columns** pane, check (to show) or uncheck (to hide) the box for the column or columns as needed.
29
+
> [!NOTE]
30
+
> If you want to re-arrange the order of the columns, either drag-and-drop the column name, or select the up or down arrow next to the column name as preferred.
29
31
30
-
> [!NOTE] If you want to re-arrange the order of the columns, either drag-and-drop the column name, or select the up or down arrow next to the column name as preferred.
31
-
32
-
6. When you're finished, select **Save**.
32
+
1. When you're finished, select **Save**.
33
33
34
34
## Specify conditional formula to show or hide columns
35
+
35
36
You can show or hide columns in a list form based on another column's value by specifying a formula that are equations performing conditional checks on values in a SharePoint list or library.
36
37
37
38
To specify a conditional formula for a column, in the **Edit columns** pane:
38
39
39
40
1. Navigate to the desired column for which you want to set a conditional formula and find the more options menu (...) next to that column
41
+
1. In the more options, select **Edit conditional formula**.
42
+
1. In the **Edit conditional formula** dialog:
43
+
- To determine whether this column is shown or hidden, specify a conditional formula based on the value of another column.
44
+
- To clear the condition, leave it blank.
40
45
41
-
2. In the more options, select **Edit conditional formula**.
42
-
43
-
3. In the **Edit conditional formula** dialog:
44
-
- To determine whether this column is shown or hidden, specify a conditional formula based on the value of another column.
45
-
- To clear the condition, leave it blank.
46
-
47
-
4. When you are finished, select **Save**.
46
+
1. When you are finished, select **Save**.
48
47
49
48
### Get started with conditional formulas
50
-
Formulas are equations that perform conditional expressions on column values in a list or library. A formula starts with an equal sign (=) followed by the _if_ function that returns either a _true_ or a _false_ result.
49
+
50
+
Formulas are equations that perform conditional expressions on column values in a list or library. A formula starts with an equal sign (=) followed by the _if_ function that returns either a _true_ or a _false_ result.
51
51
52
52
For example, the following formula checks if the value for the *Category* column is *Product Management*.
53
53
@@ -60,21 +60,25 @@ Returning _true_ results in hiding the column in the form while returning _false
60
60
The column is represented by specifying the **internal name** of the field surrounded by square brackets and preceeded by a dollar sign: [$InternalName]. For example, to get the value of a field with an internal name of "ProductName", use [$ProductName].
61
61
62
62
#### Supported column types in conditional show or hide
63
+
63
64
While the formula supports many of the available column types, we do not currently support the following column types:
65
+
64
66
* Currency columns
65
67
* Location columns
66
68
* Calculated columns
67
69
68
70
#### Quick formula reference
69
71
70
72
##### Choice column
73
+
71
74
The following formula checks if the choice column [$Category] has a value *Product Management*:
The following formula checks if the choice column [$Flightscost] is less than or equal to *120*:
79
83
80
84
```
@@ -88,6 +92,7 @@ You can also do arithmetic calculations, such as adding the value of two columns
88
92
```
89
93
90
94
##### Date column
95
+
91
96
The following formula checks if the date column [$StartDate] is equal to a specific date. To do so, it uses the *Date()* function to convert a given string into a date:
92
97
93
98
```
@@ -105,6 +110,3 @@ An example checking if the dates from [$StartDate] and [$EndDate] columns are be
0 commit comments