Hi there,
I wanna write “From” and “To” in a repeating group of messages.
How can i make an “OR” condition, like if the sender of the message is “user1” OR “user2” then put it in “From” and vice versa in “To”?
just can’t find it and it makes me frustrated!
Thanks!
Conceptually, one way to do it would look something like this:
Search for user, where user id = 1, count: is 1 OR Search for user, where user id = 2, count: is 1
Thanks. sorry but i’m really confused… thought it would be much more like programming, with simple “and”, “or” etc…
so maybe if you or someone else have an app example or a screenshot it would be great. thanks again
Could you share a link to your app editor? I’d be happy to show you based on your specific context/need, as I’m not quite sure exactly what you’re looking to do.
Cheers,
Scott
Hi and thanks for the quick reply!
I did some changes since my post so i’m a bit worried to ruin it…
But the basic question is how do i make “AND”, “OR” conditions to look for in the database?
I think of an example:
IF [current user. name] == [“jhone”] OR ([current page user.name == [“Danny”] AND [current user.Name == “Ben”]) THEN textA == “bla bla1”, ELSE textA=="bla bla2"
Don’t know if the example is good but hope i illustrated the idea…
Thanks!
Okay, I think I understand where you’re at.
So, Bubble doesn’t have a function for if x then y else if z. It does support this functionality, but it needs to be input a bit differently. Will feel odd at first, but becomes normal the more you use it. Also, something to be aware of, Bubble doesn’t support parenthesis so it evaluate items in chronological order.
For conditional logic on any of the elements, the way to this would be:
- Include the default value in a text field that’s dynamic (e.g., bla bla2)
- Go to the conditional tab. Then set up conditions where you want to change the text (e.g., When: current user’s first name is Danny). Then, set this condition so that when it’s true it changes the “text” to bla bla1
- Add additional conditions as needed.
Hope this helps.
Hi, thanks for your help!