https://discord.gg/botpress logo
#🤝help
How can I prompt if / then statements in the find records card ai filter generator?
# 🤝help
w

worried-queen-393

12/28/2023, 7:48 PM
Any examples? I tried this but doesn't seem to work: Find records where TableCol2 is true; and if ({{workflow.var1}}) then TableCol1 is true Thanks for any ideas ❤️
a

acceptable-kangaroo-64719

12/29/2023, 12:12 PM
Hey @worried-queen-393 you can break these up into different nodes and then use transitions to go to the correct one
like this
w

worried-queen-393

12/30/2023, 11:44 PM
Thanks @acceptable-kangaroo-64719. I have 7 variables in a product feature table. The user selects true/false for all 7. In the search, 3 are strictly exclusive, yes/no, the other 4 are inclusive (include if they ask for it, but don't exclude if they didn't). For example if they want an office printer, color (var1=true) with wifi (var2=true), don't exclude fax capability (var3=false) just because they said "no" to fax. I was hoping the if/then statement would allow if fax is true, include it, but still include it if fax was false. Is there a way to do this?
Another way of saying it: checking whether the variable/feature is true or skipping it if it's not applicable, for 4 variables
a

acceptable-kangaroo-64719

01/11/2024, 6:01 PM
Can still do this in transitions but with boolean logic, though it may be easier to do it in code, like:
Copy code
js
transition1 = var1 && var2 && !var4
transition2 = var3 && !var4
transition3 = var4 || var5
then do your transitions based off of
transition1
etc