Using If statements in formula

Hi Developers,

I’m quite new to bubble. I want to make a excel-like formula, but don’t find the right way to do it.
What I want to do:
-Count the days between 2 dates (don’t take the hours into account)
-Create if statement to change the value.

After calculating the days between 2 dates I have a value (call it x for now).

If x<-1, I want it to change to -1.
if x>6, I want it to change to 6.
So x can have a value between -1 and 6. Everything lower than -1 must become -1 and everything higher then 6 must become 6.

Thanks in advance

1 Like

@klaas.vanhoeck you can do this with conditions.

You can only change visual elements with conditions. I want to change a value.

@klaas.vanhoeck You can change values too with workfows only when it meets a certain condition. Please share a test page here so you can test with an example

Thank you neerja, I found the solution!

1 Like

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