We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard (Portal)
Windows
Yes
{ "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "Initialize_variable": { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "jsontest", "type": "string" } ] }, "runAfter": {} }, "For_each_contact": { "type": "foreach", "foreach": "@body('List_rows_-_contacts')?['value']", "actions": { "For_each_account": { "type": "foreach", "foreach": "@body('List_rows_-_accounts')?['value']", "actions": { "Set_variable": { "type": "SetVariable", "inputs": { "name": "jsontest", "value": "{\n\"accountValue\": @{item()?['name']},\n\"emailAddressValue\" @{item()?['emailaddress1']}: \n}" } } } } }, "runAfter": { "List_rows_-_contacts": [ "SUCCEEDED" ] } }, "List_rows_-_accounts": { "type": "ApiConnection", "inputs": { "host": { "connection": { "referenceName": "commondataservice-1" } }, "method": "get", "headers": { "prefer": "odata.include-annotations=*", "accept": "application/json;odata.metadata=full", "organization": "@{encodeURIComponent(encodeURIComponent('DATAVERSE ORG'))}" }, "path": "/api/data/v9.1/@{encodeURIComponent(encodeURIComponent('accounts'))}", "retryPolicy": { "type": "none" } }, "runAfter": { "Initialize_variable": [ "SUCCEEDED" ] }, "operationOptions": "DisableAsyncPattern" }, "List_rows_-_contacts": { "type": "ApiConnection", "inputs": { "host": { "connection": { "referenceName": "commondataservice" } }, "method": "get", "headers": { "prefer": "odata.include-annotations=*", "accept": "application/json;odata.metadata=full", "organization": "@{encodeURIComponent(encodeURIComponent('DATAVERSE ORG'))}" }, "path": "/api/data/v9.1/@{encodeURIComponent(encodeURIComponent('contacts'))}", "retryPolicy": { "type": "none" } }, "runAfter": { "List_rows_-_accounts": [ "SUCCEEDED" ] }, "operationOptions": "DisableAsyncPattern" } }, "contentVersion": "1.0.0.0", "outputs": {}, "triggers": { "When_a_HTTP_request_is_received": { "type": "Request", "kind": "Http" } } }, "kind": "Stateful" }
values of the actions is being returned as item and should refer to the loop:
\n"accountValue": @{item()?['name']},\n"emailAddressValue" @{item()?['emailaddress1']}: \n}"
should be
\n"accountValue": @{items('For_each_account')?['name']},\n"emailAddressValue" @{items('For_each_contact')?['emailaddress1']}: \n}"
The action lists the fields correctly, but we can't set the value properly, it's not recognizing the loop context.
Edge
No response
The text was updated successfully, but these errors were encountered:
Assigning this to Eric as well as he looks into the other nested foreach issue #6239
Sorry, something went wrong.
Eric-B-Wu
No branches or pull requests
Describe the Bug with repro steps
What type of Logic App Is this happening in?
Standard (Portal)
Which operating system are you using?
Windows
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
Screenshots or Videos
values of the actions is being returned as item and should refer to the loop:
\n"accountValue": @{item()?['name']},\n"emailAddressValue" @{item()?['emailaddress1']}: \n}"
should be
\n"accountValue": @{items('For_each_account')?['name']},\n"emailAddressValue" @{items('For_each_contact')?['emailaddress1']}: \n}"
The action lists the fields correctly, but we can't set the value properly, it's not recognizing the loop context.
Browser
Edge
Additional context
No response
The text was updated successfully, but these errors were encountered: