Not able to set a style conditional based on the value of a field

I’m trying to use a conditional on a style to set a background color that’s different if the user has dark mode specified in their settings. I’m getting this error:

I would consider this a bug. Is there a work around that anyone is using?

UPDATE: Ugh nvm. I realize i may have misunderstood your question/issue. If so, im sorry.
——
I dont know if it’s a bug. I think it’s same behavior as in web builder (since they share the same backend). I know the way i saw it implemented was by setting a state on the user’s profile if i recall correctly. It was in a video i saw. I’ll link the video once i find it.

Here’s the video:

I had a similar need, but unfortunately, that work around wasnt convenient for me. So i did change at the global style level, i changed on the element level in my page. Not ideal i know, and more configuring, but it worked for me.

Yeah - that video has a conditional on the appearance for body that says "Current User’s Dark Mode is “yes” … which is exactly what I’m doing basically… and what spawns that error. Weird looking error too. Feels like something is unfinished there.

Ah - but you CAN do a conditional based on a field that’s set to yes / no. You cannot do a conditional on a field that is tied to an option set or is data.

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