Hi,
I have a Flow that creates tasks based on an Excel table. My question is how would I be able to designate the Label to its appropriate category? Below is the sample of my flow.
Also included is the sample task table created. I have the Category column below to be specific Label and manually updated the text of each label needed to a different text.
Any assistance is greatly appreciated.
Hey @yiwen126
I dont think it might be the best approach but use a switch statement. Pass the category column in it and make appropriate cases.
Maximum switch case limit is 25.
Where would I place the switch statement in my flow?
Sorry, I'm still very new to this. Do you mean after Create a task within Apply to each? I don't see the ability to add a new step before Create a task. And how would you write it? Could you provide an example?
You cannot add anything before create task.
So you will have to delete it.
Then use switch action.
And then for each separate case use the create task action.
That would be a lot of flow to repeat after each switch condition. Do you have any other suggestions?
I know, but currently can't think of a better method.
Make a case, then copy the create a task action and then make another case and copy it in that. Just make sure you change the color value.
The only other way to do it that I see is to initialize one variable for each category set to false. Then use a switch statement based on the input to set one of the variables based on the category value being passed in. Then use all the variables in the category field of the create a task. Its pretty similar to @Sundeep_Malik 's suggestion. But you only have to create one Create a task action.
User | Count |
---|---|
27 | |
14 | |
12 | |
10 | |
9 |
User | Count |
---|---|
50 | |
29 | |
28 | |
24 | |
20 |