So I wasted two hours from my life to compare a component’s state which is a text (aka string) to an option set text hard coded. So what am I talking about? I will explain in detail, it won’t take more than a couple of minutes to understand. The followings details how to compare text in bubble and avoid pitfalls (I fall into).
So I have the following option set in my data, full of foreign language texts.

What is the problem?
The problem is I have special characters with a space between two worlds, means a text and I want conditionally load the left side picture according to the selected dropdown’s value. The problem when I select “Családi ház” the reusable component (RE – Property Dropdown A’s Property Type State is “Családi ház” should evaluate to true, mean yes in bubble term. But guess what, it evaluates to no means false.
But the left side evaluates as you see on “Családi ház” and the right side is also “Családi ház”, so what now?
(without quotes you cannot wrote text after evaluation, despite on the bubble forum someone says it solves the problem, but not!)


The solution
Despite on the frontend the left side of the state value is what it seems in the bubble database and algorithms evaluate somehow different the left side, so we cannot compare to a string. We have to use the right side the “Get an option” and use the display value, and voilá it works!



So when you are trying to compare a string from a database use the data from the database as well, and don’t hard code the string into an equation. Cheers!
Leave a Reply