Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
357 stars 299 forks source link

How to pass parameter that is an array of ints #1087

Closed seplee closed 2 weeks ago

seplee commented 11 months ago

Describe the Bug with repro steps

I want to pass an array of ints as a parameter to a recurrence trigger. None of the ways I have tried work.

  1. Create an appsetting with one of the following contents:- [1,2,3]
    • ["1","2","3"]
    • [/"1/",/"2/",/"3/"]
  1. Create a parameter that references the appsetting
  2. Reference the parameter in the workflow

I had also tried to pass a parameter that evaluated to a string into the array. This did not seem to work either.

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": {},
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "Recurrence": {
                "recurrence": {
                    "frequency": "Day",
                    "interval": 1,
                    "schedule": {
                        "hours": "@{parameters('lee-test-recurrence-parameter')}",
                        "minutes": [
                            10,
                            15,
                            20,
                            25,
                            30,
                            35,
                            40,
                            45,
                            50,
                            55
                        ]
                    },
                    "timeZone": "US Eastern Standard Time"
                },
                "type": "Recurrence"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

This is the code generated by the designer when three hours are selected:

image

Here are some of the methods I tried:

image

Browser

Brave

Additional context

No response

AB#25183193

Eric-B-Wu commented 11 months ago

Thanks for creating this issue @seplee, unfortunately currently we don't support tokens in our recurrence triggers. In old designer, we didn't support tokens altogether in triggers, so I'd need to confirm with our backend team to ensure this is supported as a whole. I'll be marking this as a feature request, so it doesn't get lost as a potential feature - that being said, it will likely not take priority because this was never an existing feature

seplee commented 11 months ago

@Eric-B-Wu Thanks for the answer! Even if tokens are not supported in recurrence triggers, they seem to work for some keys. For example, I can pass a single value to the hours array as a token, just not an array of values.

I got around the limitation of adding arrays to properties of schedule by defining the json object for schedule in App Config and passing it in as a parameter.

seplee commented 11 months ago

(outside of the context of this ticket) Is there a way to learn what behavior isn't supported? This is the third time that my team has made a faux-paw with a features based on an understanding of what Logic App Workflows can do that we gained from trying stuff in the Designer or in Code View. The implementation details of Logic App Workflows are opaque to us, so we rely on direct experimentation and the documentation. Is there a way that we could learn about how the backend works?

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

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open for 45 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.