LogicAppsUX icon indicating copy to clipboard operation
LogicAppsUX copied to clipboard

Dynamic values are not re-setting after the change in input fields

Open siddharth-ms opened this issue 1 year ago • 2 comments

Describe the Bug with repro steps

  1. [Internal] Open sid-sap-testbox.ui-test in BTS4
  2. Create [RFC] Call function in SAP in-app action
  3. Set the Input Type to Custom
  4. Then select the optional RFC Name, and set it as STFC_CONNECTION
  5. A new dynamic textbox appear REQTEXT, enter Hello in that

image

  1. Save and refresh the page.
  2. Change the RFC Name to RFC_XML_TEST_1.
  3. It will call /dynamicInvoke again, and new array field IM_XML_TABLE will appear.
  4. Input Hello in that and click save.
  5. In code view, You can still see parameter REQTEXT which was only present for STFC_CONNECTION.

image

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

Yes

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "For_each": {
                "actions": {
                    "Compose": {
                        "inputs": "-> @{items('For_each')}",
                        "type": "Compose"
                    }
                },
                "foreach": "@outputs('[RFC]_Call_function_in_SAP')?['body']?['content']?['OUT_XML_TABLE']",
                "runAfter": {
                    "[RFC]_Call_function_in_SAP": [
                        "SUCCEEDED"
                    ]
                },
                "type": "foreach"
            },
            "[RFC]_Call_function_in_SAP": {
                "inputs": {
                    "parameters": {
                        "body": {
                            "IM_XML_TABLE": [
                                "Hello"
                            ],
                            "REQUTEXT": "Hello"
                        },
                        "inputBodyType": "Custom",
                        "outputBodyType": "JSON",
                        "rfcGroupFilter": "*",
                        "rfcName": "RFC_XML_TEST_1"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "sap",
                        "operationId": "callRfc",
                        "serviceProviderId": "/serviceProviders/sap"
                    }
                },
                "runAfter": {},
                "type": "ServiceProvider"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "kind": "Http",
                "type": "Request"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

No response

Browser

Edge

Additional context

No response

siddharth-ms avatar Jan 24 '24 15:01 siddharth-ms

I think the issue here is that we take there parameters from the body to populate the dynamic value that appears. In this example, after saving, we then have 2 additional properties:

  1. Body with value of: { "REQUTEXT": "Hello" }
  2. REQUTEXT with value of: Hello 2 being what is populated by the body. The issue is when we switch the RFCName to RFC_XML_TEST_1 although we remove REQUTEXT because its a dynamic property, we don't remove the Body. Which means it will persist there even when REQUTEXT no longer exists. I've tested this on old designer, and it has the same functionality - as there isn't a great way of knowing when to remove the stepInputs we use to generate the dynamic value. The current expectation is that the user also deletes the Body parameter when switching dynamic data; however, I'll mark this as feature request, as this may be something we want to implement in the future

Eric-B-Wu avatar Feb 09 '24 16:02 Eric-B-Wu

https://github.com/Azure/LogicAppsUX/assets/95886809/2ee978f5-770f-4d52-bb63-ce0a8c373cec

Eric-B-Wu avatar Feb 09 '24 16:02 Eric-B-Wu