title: Azure ARM templates - empty values as a parameters, IF function
body: <p>I am preparing ARM template for "Schedule update deployment" in Update Management service. I want to add parameters like: <code>"excludedKbNumbers"</code> and <code>"includedKbNumbers"</code>. I am deploying my templates using powershell. When I am passing KB numbers using mentioned parameters templates completed successfully. In case when I am putting KB number using one of the mentioned parameters, second is empty, template completed successfully. Problem is when I dont want to pass Included/Exluded KB numbers, in my powershell deployment command I am not putting parameter names  <code>"excludedKbNumbers"</code> and <code>"includedKbNumbers"</code>, and then I am receiving below error: <code>"message": "{\"Message\":\"The request is invalid.\",\"ModelState\":{\"softwareUpdateConfiguration.properties.updateConfiguration\":[\"Software update configuration has same KbNumbers in 
  includedKbNumbers and excludedKbNumbers.\"]}}"</code></p>
  
  <p>I am using this structure in my template <code>json('null')</code> and this is a problematic area.
  extract from my template:</p>
  
  <pre><code>    "parameters": {
          "excludedKbNumbers": {
              "type": "string",
              "defaultValue": "",
              "metadata": {
                  "description": "Specify excluded KB numbers, required data structure: 123456"
              }
          },
          "includedKbNumbers": {
              "type": "string",
              "defaultValue": "",
              "metadata": {
                  "description": "Specify included KB numbers, required data structure: 123456"
              }
     },
  "resources": [
          {
              "type": "Microsoft.Automation/automationAccounts/softwareUpdateConfigurations",
              "apiVersion": "2017-05-15-preview",
              "name": "[concat(parameters('automationAccountName'), '/', parameters('scheduleName'))]",
              "properties": {
                  "updateConfiguration": {
                      "operatingSystem": "[parameters('operatingSystem')]",
                      "windows": {
                          "includedUpdateClassifications": "[parameters('Classification')]",
                          "excludedKbNumbers": [
                              "[if(empty(parameters('excludedKbNumbers')), json('null'), parameters('excludedKbNumbers'))]"
                          ],
                          "includedKbNumbers": [
                              "[if(empty(parameters('includedKbNumbers')), json('null'), parameters('includedKbNumbers'))]"
                          ],
                          "rebootSetting": "IfRequired"
                      },
                      "targets": {
                          "azureQueries": [
                              {
                                  "scope": [
                                      "[concat('/subscriptions', '/', parameters('subscriptionID'))]"
                                  ],
                                  "tagSettings": {
                                      "tags": {
                                          "[parameters('tagKey')]": [
                                              "[parameters('tagValue')]"
                                          ]
                                      },
                                      "filterOperator": "All"
                                  },
                                  "locations": []
                              }
                          ]
                      },
                      "duration": "PT2H"
                  },
                  "tasks": {},
                  "scheduleInfo": {
                      "isEnabled": false,
                      "startTime": "2050-03-03T13:10:00+01:00",
                      "expiryTime": "2050-03-03T13:10:00+01:00",
                      "frequency": "OneTime",
                      "timeZone": "Europe/Warsaw"
                  }
              }
          }
      ],
  </code></pre>