The variable of type 'Boolean' cannot be initialized or updated with value of type 'String'. The variable only supports values of types 'Boolean'.

{tocify} $title={Table of Contents}


Issue


Today got below error in a logic app at runtime

The variable  of type 'Boolean' cannot be initialized or updated with value of type 'String'. The variable  only supports values of types 'Boolean'.



The variable 'isLogSent' of type 'Boolean' cannot be initialized or updated with value of type 'String'. The variable 'isLogSent' only supports values of types 'Boolean'.


Why it happened


In the logic app, have initialized a Boolean variable which is set to False and upon successful execution of an action it is set to True.

All look fine during design time and was able to save it to, very trivial thing.

However, at run time, it complained that the value used to initialized this variable is String and is not supported.

In logic app, False/True is not identified as Boolean value rather it is treated as String.



What to do


In my opinion, we should be able to initialize/set Boolean variables with either of the values
  • false/true
  • False/True
  • 0/1
However, in Logic App only accepted value is false/true,  so did the change.

set correct value to boolean variable in logic app


Initialized the variable with false and set it with true where an action was successful.



If you have questions or suggestions, feel free to do in comments section below !!!


Do share if you find this helpful .......
 
                          Knowledge Sharing is Caring !!!!!!





Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post