Skip to content

Commit 18c66de

Browse files
committed
2 parents 6e6b8b8 + 67d18c2 commit 18c66de

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

docs/declarative-customization/list-form-conditional-show-hide.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Show or hide columns in a list form
33
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: 06/28/2022
4+
ms.date: 10/30/2024
55
ms.localizationpriority: high
66
---
77

@@ -38,7 +38,7 @@ You can show or hide columns in a list form based on another column's value by s
3838
To specify a conditional formula for a column, in the **Edit columns** pane:
3939

4040
1. Navigate to the desired column for which you want to set a conditional formula
41-
1. Select the far right hand edge of the column name to display the options menu **(...)**
41+
1. Select the far right-hand edge of the column name to display the options menu **(...)**
4242
1. In the more options, select **Edit conditional formula**.
4343
1. In the **Edit conditional formula** dialog:
4444
- To determine whether this column is shown or hidden, specify a conditional formula based on the value of another column.
@@ -56,7 +56,7 @@ For example, the following formula checks if the value for the *Category* column
5656
=if([$Category] == 'Product Management', 'true', 'false')
5757
```
5858

59-
Returning _true_ results in showing the column on the form while returning _false_ hides the column.
59+
Returning _true_ shows the column on the form while returning _false_ hides the column.
6060

6161
The column is represented by specifying the **internal name** of the field surrounded by square brackets and preceded by a dollar sign: `[$InternalName]`. For example, to get the value of a field with an internal name of "ProductName", use `[$ProductName]`.
6262

@@ -66,7 +66,7 @@ While the formula supports many of the available column types, we do not current
6666

6767
- Person or Group with multiple selections
6868
- Choice with multiple selections
69-
- Time calculations in Date and Time column
69+
- Time calculations in **Date and Time** column
7070
- Currency columns
7171
- Location columns
7272
- Calculated columns
@@ -98,7 +98,7 @@ You can also do arithmetic calculations, such as adding the value of two columns
9898

9999
##### Date column
100100

101-
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:
101+
The following formula checks if the date column `[$StartDate]` equals a specific date. To do so, it uses the *Date()* function to convert a given string into a date:
102102

103103
```
104104
=if([$StartDate] == Date('4/6/2020'), 'true', 'false')
@@ -126,16 +126,26 @@ The following formula checks if an email of person column `[$Owner]` is equal to
126126

127127
##### Boolean (Yes/No) column
128128

129-
The following formula checks if the Yes/No column `[$Promoted]` is equal to a Yes. To do so, it checks for the value _true_ which maps to _Yes_ for users.
129+
The following formula checks if the Yes/No column `[$Promoted]` equals a Yes. To do so, it checks for the value _true_ which maps to _Yes_ for users.
130130

131131
```
132132
=if([$Promoted] == true, 'true', 'false')
133133
```
134134

135+
The following are also valid:
136+
137+
```
138+
=if([$Promoted], 'true', 'false')
139+
```
140+
141+
```
142+
=[$Promoted]
143+
```
144+
135145
##### Lookup column
136146

137147
> [!NOTE]
138-
> When accessing lookup columns in column or view formatting, you have access to the lookup value and lookup id as separate values. In form formatting and conditional field expressions, both values are returned as a single line of text. For instance, a lookup column referencing an item with item ID 1 (in the source list) with a value of `Toronto` will have a value of `1;#Toronto` when used in form formatting or conditional field expressions.
148+
> When accessing lookup columns in a column or view formatting, you can access the lookup value and lookup id as separate values. In form formatting and conditional field expressions, both values are returned as a single line of text. For instance, a lookup column referencing an item with item ID 1 (in the source list) with a value of `Toronto` will have a value of `1;#Toronto` when used in form formatting or conditional field expressions.
139149
140150
The following formula checks if the lookup column `[$City]` has a value equal to *Toronto*. To do so, it splits the lookup value result by the separator and checks against the value.
141151

0 commit comments

Comments
 (0)