gpt4 book ai didi

azure - 逻辑应用: Access for-each value in javascript step

转载 作者:行者123 更新时间:2023-12-03 02:11:42 29 4
gpt4 key购买 nike

在我的逻辑应用程序中,我有一个正在迭代 json 列表的 For-Each block 。在 ForEach block 内,我有一个 JavaScript 步骤,我在其中尝试访问 ForEach 的当前对象。

我尝试过失败:

workflowContext.actions["For_each"].body

Error: InlineCodeOperationMissing. The inline code action'JavaScriptCode' execution failed, with error 'The specified action'For_each' is not in the provided workflowContext. Try including theaction by adding it to explicitDependency.actions.

我也尝试过:

items('For_each').IsEmailSent

InlineCodeScriptRuntimeFailure. The inline code action'JavaScriptCode' execution failed, with error 'items is not defined'.

最佳答案

Error: InlineCodeOperationMissing. The inline code action'JavaScriptCode' execution failed, with error 'The specified action 'For_each' is not in the provided workflowContext. Try including theaction by adding it to explicitDependency.actions.

workflowContext.actions["For_each"].body

您可以使用此代码。

workflowContext.actions.For_each.foreach

在我的情况下,action.for_each,在您的情况下可能是不同的步骤,您可以转到代码并查看结构。

enter image description here

<小时/>

enter image description here

<小时/>

enter image description here

更多理解请阅读这篇关于如何在逻辑应用中使用 js 的文章 Franky's Notes , Cyber Engineer

关于azure - 逻辑应用: Access for-each value in javascript step,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73146676/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com