Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
73 stars 78 forks source link

new line character broken when used in editor #3496

Open SquirrelAssassin opened 10 months ago

SquirrelAssassin commented 10 months ago

Describe the Bug with repro steps

Make a new variable. try something like a value of array(split(variables('something'), '\n'))

when you save it, the code will change it to '\\n'

What type of Logic App Is this happening in?

Standard (Portal)

Are you using new designer or old designer

New Designer

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

No

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "For_each": {
                "actions": {
                    "Parse_JSON": {
                        "inputs": {
                            "content": "@items('For_each')",
                            "schema": {
                                "properties": {
                                    "action_type": {
                                        "type": "string"
                                    },
                                    "count": {
                                        "type": "integer"
                                    },
                                    "device_id": {
                                        "type": "string"
                                    },
                                    "device_name": {
                                        "type": "string"
                                    },
                                    "dry_run": {
                                        "type": "boolean"
                                    },
                                    "executable_file_size": {
                                        "type": "integer"
                                    },
                                    "executable_name": {
                                        "type": "string"
                                    },
                                    "executable_path": {
                                        "type": "string"
                                    },
                                    "guid": {
                                        "type": "string"
                                    },
                                    "id": {
                                        "type": "string"
                                    },
                                    "occurrence_date": {
                                        "type": "string"
                                    },
                                    "reason": {
                                        "type": "string"
                                    },
                                    "tenant_id": {
                                        "type": "string"
                                    },
                                    "threat_id": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "type": "ParseJson"
                    },
                    "Send_Data": {
                        "inputs": {
                            "body": "@{body('Parse_JSON')}",
                            "headers": {
                                "Log-Type": "Halcyon"
                            },
                            "host": {
                                "connection": {
                                    "referenceName": "azureloganalyticsdatacollector-2"
                                }
                            },
                            "method": "post",
                            "path": "/api/logs"
                        },
                        "runAfter": {
                            "Parse_JSON": [
                                "SUCCEEDED"
                            ]
                        },
                        "type": "ApiConnection"
                    }
                },
                "foreach": "@variables('a1')",
                "runAfter": {
                    "Initialize_variable": [
                        "SUCCEEDED"
                    ]
                },
                "type": "foreach"
            },
            "Initialize_variable": {
                "inputs": {
                    "variables": [
                        {
                            "name": "a1",
                            "type": "array",
                            "value": "@array(split(triggerBody(),'\n'))"
                        }
                    ]
                },
                "runAfter": {},
                "type": "InitializeVariable"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "inputs": {
                    "schema": {
                        "properties": {
                            "action_type": {
                                "type": "string"
                            },
                            "count": {
                                "type": "integer"
                            },
                            "device_id": {
                                "type": "string"
                            },
                            "device_name": {
                                "type": "string"
                            },
                            "dry_run": {
                                "type": "boolean"
                            },
                            "executable_file_size": {
                                "type": "integer"
                            },
                            "executable_name": {
                                "type": "string"
                            },
                            "executable_path": {
                                "type": "string"
                            },
                            "guid": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "occurrence_date": {
                                "type": "string"
                            },
                            "reason": {
                                "type": "string"
                            },
                            "tenant_id": {
                                "type": "string"
                            },
                            "threat_id": {
                                "type": "string"
                            },
                            "type": {
                                "type": "string"
                            }
                        },
                        "type": "object"
                    }
                },
                "kind": "Http",
                "type": "Request"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

No response

Browser

edge

Additional context

No response

AB#25554750

Eric-B-Wu commented 10 months ago

@preetriti1 this seems to also have the same interaction in Old designer, do you know if we should be supporting this, or if there would be consequences supporting this?

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] commented 6 months ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

preetriti1 commented 3 months ago

@Eric-B-Wu No this is not intended and should be fixed.