# prefect-community


07/19/2019, 8:17 AM
Hi everyone, I am trying to use a conditional flow with a mapped results.Here is an example of what I would like to do :
Copy code
conditions =
as =
bs =
ifelse(conditions, as, bs)
It does not work out because the ifelse function expect the condition to be a boolean, not a list of boolean. Is there a way to do it differently?

Chris White

07/19/2019, 3:39 PM
is your goal to do many if/else conditions (one for each mapped result) or a single if/else condition? If it’s the former, you might try:
Copy code
results =, as, bs)
👍 1


07/22/2019, 6:10 AM
As far as I know, this does not work out. "ifelse" is a function, not a task. Or do you mean I could try to decorate the ifelse function with a "task" decorator?