azure-docs
azure-docs copied to clipboard
Null-ignore operator example is incorrect.
In the Operator section of the page, the following example is provided for the question mark operator (AKA null-ignoring operator):
@coalesce(trigger().outputs?.body?.<someProperty>, '
Using the ? and the dot operators together creates a formula flagged as invalid when using the PowerApps formula editor. Can you confirm that that example is correct? I believe it should be:
@coalesce(trigger().outputs?body?<someProperty>, '
Additionally, could you clarify (in the docs page) if the null-ignoring operator needs to be used at every "level" of the JSON object being referenced or does a higher-level usage also allow nulls at lower levels referenced?
E.g. given the object {"outputs" : { "body" : { "existingProperty" : "Levl3OfJSON" } }
Which of the following will work and not through a runtime error?:
-
trigger().outputs?body.['someMissingProperty']
-
trigger().outputs?body?['someMissingProperty']
-
trigger().outputs.body?['someMissingProperty']
-
trigger().outputs?body?['someMissingProperty']
-
trigger().outputs?.body?.['someMissingProperty']
Finally, there is some debate in the PAuto forums on whether or not the null-ignore operator works when the object being referenced is an array instead of proper JSON object. If that is true could you provide clarification/details in the docs , please?
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: d03bfc0e-6636-8847-8a22-1bf280d26b6e
- Version Independent ID: ea462c47-798f-981b-85fd-3771a4a1f5a4
- Content: Workflow Definition Language schema reference - Azure Logic Apps
- Content Source: articles/logic-apps/logic-apps-workflow-definition-language.md
- Service: logic-apps
- GitHub Login: @ecfan
- Microsoft Alias: estfan
@DTronD Thanks for your feedback! We will investigate and update as appropriate.
@DTronD, I'm checking with the product team about your question.