Skip to content

Commit 526fe0c

Browse files
authored
Added known Switch limitation
1 parent 0c1b1c9 commit 526fe0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

articles/active-directory/app-provisioning/functions-for-customizing-application-data.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,10 @@ When **source** value matches a **key**, returns **value** for that **key**. If
11101110
> Switch function performs a case-sensitive string comparison of the **source** and **key** values. If you'd like to perform a case-insensitive comparison, normalize the **source** string before comparison using a nested ToLower function and ensure that all **key** strings use lowercase.
11111111
> Example: `Switch(ToLower([statusFlag]), "0", "true", "1", "false", "0")`. In this example, the **source** attribute `statusFlag` may have values ("True" / "true" / "TRUE"). However, the Switch function will always convert it to lowercase string "true" before comparison with **key** parameters.
11121112
1113+
> [!CAUTION]
1114+
> For the **source** parameter, do not use the nested functions IsPresent, IsNull or IsNullOrEmpty. Instead use a literal empty string as one of the key values.
1115+
> Example: `Switch([statusFlag], "Default Value", "true", "1", "", "0")`. In this example, if the **source** attribute `statusFlag` is empty, the Switch function will return the value 0.
1116+
11131117
**Parameters:**
11141118

11151119
| Name | Required/ Repeating | Type | Notes |

0 commit comments

Comments
 (0)