Yes/No response type is localized

We use the “Yes/No” result type extensively, especially for conditioning whether or not to display certain UI elements, or to proceed/stop with certain workflows. My common sense understanding is that they function as “boolean”, i.e. true/false - not as actual strings.

However, what I have noticed, once we introduced another language (Dutch), is that the responses also get localized. So when I have a condition to display a UI element, and the condition evaluates to “Yes”, it never actually does anything, because the condition result is actually “Ja”.
E.g. When Expression hasAccess result is "yes" - is not evaluated correctly.

I have to mention that this happens when I use an Expression from the Toolbox plugin (see Toolbox Plugin | Bubble) - and I set the result type to “yes / no”.

Is this intentional? Or is this an issue on the plugin side?

1 Like

The expression is a text field. When a boolean dynamic expression is rendered to text, Bubble uses the localization string.

In javascript, boolean is represented by true or false, so its best to override Bubble’s text conversion with :formatted as text


1 Like

This does the trick, and I can still use the Expression’s result in conditions.
Thanks a lot!

1 Like

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