LogicAppsUX icon indicating copy to clipboard operation
LogicAppsUX copied to clipboard

non-string types changed to string automatically by editor

Open thinkOfaNumber opened this issue 1 year ago • 2 comments

Describe the Bug with repro steps

This is not limited to the select action - it appears to be present whenever the logic app is saved, but I will detail how to repro using select:

  1. create a logic app with any trigger - in my case an array of objects
  2. add a second step: the inbuilt data operation "select"
  3. make the "from" field of the select action any array
  4. add one row to the select. Call it anything. Add an expression to the value bool(false)
  5. save the workflow and inspect the workflow.json. You'll notice the expression is saved (e.g.) "isAvailable": "@{bool(false)}", which is a string
  6. edit the workflow.json to be "isAvailable": "@bool(false)", (remove the curly braces)
  7. reload the designer window in vs Code
  8. add another row to the select statement - anything
  9. save the workflow and inspect the workflow.json again - you'll notice the expression is changed back to the version with braces

If the select action is not edited, the logic app works and can be deployed/run with the boolean value, however if the select action is edited, the boolean value is changed to string interpolation (curly braces).

The outcome of this is that the object becomes:

[
   {
      "isAvailable": "False"
   }
]

instead of

[
   {
      "isAvailable": false
   }
]

What type of Logic App Is this happening in?

Standard (VSCode)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

No response

Screenshots or Videos

No response

Browser

VS Code (haven't tried in portal)

Additional context

No response

thinkOfaNumber avatar Jan 31 '24 03:01 thinkOfaNumber

@thinkOfaNumber - Can you please share what all actions and editors you have noticed this?

preetriti1 avatar May 02 '24 00:05 preetriti1

I recall the select action, possibly in others such as compose, but this was some time ago so I’d have to go back and just try more to be sure.

I mainly used VS Code as the editor, again would have to try the online editor as I don’t remember!

thinkOfaNumber avatar May 11 '24 01:05 thinkOfaNumber