title: Logic App initialize array from other variables
body: <p>What's the correct syntax to initialize an array variable with elements from other variables? I tried:</p>
  
  <pre><code>"Initialize_variable_AllEventCounts": {
                  "inputs": {
                      "variables": [
                          {
                              "name": "AllEventCounts",
                              "type": "Array",
                              "value": "[@{variables('EmailConfirmedFailureEventCount')}, @{variables('EmailConfirmedSuccessEventCount')}, @{variables('UserCreatedEventCount')}, @{variables('UserLoginFailureEventCount')}, @{variables('UserLoginSuccessEventCount')}, @{variables('UserLogoutSuccessEventCount')}]"
                          }
                      ]
                  },
                  "runAfter": {
                      "Set_variable_EmailConfirmedFailureEventCount": [
                          "Succeeded"
                      ],
                      "Set_variable_EmailConfirmedSuccess": [
                          "Succeeded"
                      ],
                      "Set_variable_UserCreatedEventCount": [
                          "Succeeded"
                      ],
                      "Set_variable_UserLoginFailureEventCount": [
                          "Succeeded"
                      ],
                      "Set_variable_UserLoginSuccessEventCount": [
                          "Succeeded"
                      ],
                      "Set_variable_UserLogoutSuccessEventCount": [
                          "Succeeded"
                      ]
                  },
                  "type": "InitializeVariable"
              },
  </code></pre>
  
  <p>There's also a <code>createArray()</code> expression that didn't provide the result that I expected:</p>
  
  <pre><code>"value": "@{createArray(variables('EmailConfirmedFailureEventCount'), variables('EmailConfirmedSuccessEventCount'), variables('UserCreatedEventCount'), variables('UserLoginFailureEventCount'), variables('UserLoginSuccessEventCount'), variables('UserLogoutSuccessEventCount'))}"
  </code></pre>
  
  <hr>
  
  <p><strong>UPDATE:</strong>
  The above createArray() syntax was close to correct. The correct syntax is as follows:</p>
  
  <pre><code>"value": "@createArray(variables('EmailConfirmedFailureEventCount'), variables('EmailConfirmedSuccessEventCount'), variables('UserCreatedEventCount'), variables('UserLoginFailureEventCount'), variables('UserLoginSuccessEventCount'), variables('UserLogoutSuccessEventCount'))"
  </code></pre>