Several conditions

Hello,

I’m a developer new to bubble and I need to create a “function” that I will be able to reuse several times. I think I have to create a custom event for that. Until here I think I’m good :slight_smile:

Now inside this custom event I will define a value for a custom state, and this value depends on several factors.

For now I was using the “only when” function, but it will be very hard to define. I have some “complex” rules to setup and i don’t know how to do. For example :
My variable will have vaue1 if :
(var1 = “yes” OR var1 = “maybe”)
AND
(var2 = “yes” OU "var2 = “not yet”)

Honestly I don’t know how to setup this rule using the “Only when” function…

Could you please help me ?

Have you considered using option sets?

You could set it up with corresponding numerical values, such as:

Yes 1
Maybe 2
Not Yet 3
No 4

Then you can run conditions based on the option set’s number.
So , if var1’s option set’s number is <= 2 AND var2’s option set’s number is 1 OR
var1’s option set’s number is <= 2 AND var2’s option set’s number is 3

This topic was automatically closed after 70 days. New replies are no longer allowed.