[英]Logic App: Access for-each value in javascript step
In my Logic App I have a For-Each block that is iterating a json list.在我的逻辑应用程序中,我有一个迭代 json 列表的 For-Each 块。 Inside the ForEach block, I have a JavaScript step in which I am trying to access the current object of the ForEach.
在 ForEach 块内,我有一个 JavaScript 步骤,在该步骤中我试图访问 ForEach 的当前 object。
I have unsuccessfully tried:我没有成功尝试:
workflowContext.actions["For_each"].body
Error: InlineCodeOperationMissing.
错误:InlineCodeOperationMissing。 The inline code action 'JavaScriptCode' execution failed, with error 'The specified action 'For_each' is not in the provided workflowContext.
内联代码操作“JavaScriptCode”执行失败,出现错误“指定的操作“For_each”不在提供的工作流上下文中。 Try including the action by adding it to explicitDependency.actions.
尝试通过将操作添加到显式依赖项来包含操作。
I also tried:我也试过:
items('For_each').IsEmailSent
InlineCodeScriptRuntimeFailure.
InlineCodeScriptRuntimeFailure。 The inline code action 'JavaScriptCode' execution failed, with error 'items is not defined'.
内联代码操作“JavaScriptCode”执行失败,出现错误“未定义项目”。
Error: InlineCodeOperationMissing.
错误:InlineCodeOperationMissing。 The inline code action 'JavaScriptCode' execution failed, with error 'The specified action 'For_each' is not in the provided workflowContext.
内联代码操作“JavaScriptCode”执行失败,出现错误“指定的操作“For_each”不在提供的工作流上下文中。 Try including the action by adding it to explicitDependency.actions.
尝试通过将操作添加到显式依赖项来包含操作。
workflowContext.actions["For_each"].body
You can use this code.您可以使用此代码。
workflowContext.actions.For_each.foreach
In my case action.for_each, in your case may be different steps you can go to code and see the structure.在我的情况下 action.for_each,在你的情况下可能是不同的步骤,你可以 go 来编码并查看结构。
More understanding read this article on how to use js in logic app Franky's Notes , Cyber Engineer更多了解阅读这篇关于如何在逻辑应用中使用 js 的文章Franky's Notes , Cyber Engineer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.