Reputation: 43
So what I'm trying to replicate is the following,
string str = GetInput from Form();
switch (str)
{
case "1":
case "1 week":
assign variable = 1
Insert variable to excel column
break;
case "2":
case "2 weeks":
assign variable = 3
Insert variable to excel column
case "4":
case "4 weeks":
assign variable = 4
Insert variable to excel column
default:
assign variable = 0
Insert variable to excel column
break;
}
Currently, my flow is similar to the following diagram
Upvotes: 1
Views: 4261
Reputation: 2417
You are using an Apply for Each
control in your flow which is equivalent to a For
loop in normal programming language. You need to use Switch
control for your problem as shown in image below. I have used a sample string parameter to show the usage of switch statement, but if your data is coming from an array you can apply Switch
inside Apply for Each
loop.
Read this article for step by step guide.
Upvotes: 1