{tocify} $title={Table of Contents}
Issue
While working on logic app, I needed a local variable and tried to add it in Scope, however was presented with below warning
Why it happened
Logic app by design only supports Initialization of variables on Global Level(variables are global within an instance of Logic App execution).
However we can use the variable at any stage of your process after initialization and perform following supported actions on it .
What to do
If you need to use variable, you can initialize it outside Scope.
Do not get confused with Top level in error, you can initialize it before and after scope. However if you plan to use it in scope, then it should be before Scope shape.
Also note that variables also can't be initialized within conditions and loops.
Feedback to Logic App product team
Like in BizTalk, where we can initialize a variable in scope (it's life is within scope), can we have same available in Logic app too?
i.e. Provision to have local variable in Logic App Scope?
Learn More about some more Logic App errors
- The request has both SAS authentication scheme and 'Bearer' authorization scheme. Only one scheme should be used
- Selected file must be between 1 and 2097152 bytes
- SplitOn property doesn't validate expression at design time
- The workflow with 'Response' action type should not have triggers with 'splitOn' property
- The template language function 'xpath' expects its first parameter to be an XML object
- The template language expression 'xxx' cannot be evaluated because property 'xxx' doesn't exist. Property selection is not supported on content of type 'application/xml'
Tags:
Azure Logic App Error