gpt4 book ai didi

azure - 有没有更好的方法来处理逻辑应用程序中的 if else 条件?

转载 作者:行者123 更新时间:2023-12-02 08:32:23 25 4
gpt4 key购买 nike

在逻辑应用中,我有一个 myarray 变量,其值为 ['1','2','3']

Foreach 连接器中,它一次会出现一个值,并希望检查它是哪个值,并根据该值将值设置为另一个变量。

在 C# 中它会像 -

foreach (item in myarray)
{
if (item == 1)
{
set variable_data = 1
}
else if (item == 2)
{
set variable_data = 2
}
else if (item == 3)
{
set variable_data = 3
}

在逻辑应用程序中我可以这样做 - enter image description here

有没有更好的方法在逻辑应用中做到这一点?

最佳答案

您可以使用switch为落实这一要求而采取的行动。 enter image description here

关于azure - 有没有更好的方法来处理逻辑应用程序中的 if else 条件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59678896/

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