Incorrect validation errors in user-defined functions when using recently added builtin functions (createObject etc.)
See original GitHub issueIt seems that the validation logic for user-defined functions does not recognize the four new builtin functions that have recently been added (https://github.com/MicrosoftDocs/azure-docs/commit/be56ab92a33c673e858fc812339ea0610dafcfc1, https://github.com/microsoft/vscode-azurearmtools/issues/1043#issuecomment-710433636).
This template
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"functions": [
{
"namespace": "test",
"members": {
"testNewFunctions": {
"parameters": [],
"output": {
"value": "[
createArray(
true(),
false(),
null(),
createObject('name', 'foo')
)]",
"type": "array"
}
}
}
}
],
"resources": [],
"outputs": {
"result": {
"type": "array",
"value": "[test.testNewFunctions()]"
}
}
}
triggers this warning in VSCode: Template validation failed: The template function 'testNewFunctions' at line '11' and column '31' is not valid. These function calls are not supported in a function definition: 'true,false,null,createObject'. Please see https://aka.ms/arm-template/#functions for usage details.
but the deployment actually succeeds:
> New-AzResourceGroupDeployment -Name 'test' -ResourceGroupName 'test-rg' -TemplateFile .\test.json
DeploymentName : test
ResourceGroupName : test-rg
ProvisioningState : Succeeded
Timestamp : 2021-02-01 13:31:24
Mode : Incremental
TemplateLink :
Parameters :
Outputs :
Name Type Value
=============== ========================= ==========
result Array [
true,
false,
null,
{
"name": "foo"
}
]
DeploymentDebugLogLevel :
msazurermtools.azurerm-vscode-tools extension version: 0.14.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
vscode-azurearmtools/CHANGELOG.md at main - GitHub
... Incorrect validation errors in user-defined functions when using recently added builtin functions (createObject etc.) ...
Read more >How to Fix Compile Error: Sub or Function Not Defined
From VB Editor Tools menu, choose References. The References dialog box opens. If VBA has identified a missing library, the last library with...
Read more >User Defined function error? - Microsoft Community
Hello, We are getting the following message when opening on of our spread sheets. "The following user-defined functions, created in an older ...
Read more >Manually adding & removing validation errors to jQuery validator
I have jQuery validation already set up, and default validations (regex, required etc) are automatically mapped using jquery.unobtrusive plugin.
Read more >PeopleCode built-in functions and language constructs
Validation. Error. IsMenuItemAuthorized. RevalidatePassword. SetCursorPos ... Use the AddEmailAddress function to add an email address for the current user.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you, it seems to be working fine.
@jberezanski-mdg This was released on Monday. Let us know if you’re still having problems, thanks.