Hi,
I'm new to Retool and since formatting options are limited, I'd like to know how to format text in a text control.
I tried using the checkbox control but there is no read-only feature and there was no way to disable user changes whout greying-out the control.
What I want is: "Feature is ON" and "Feature is OFF".
What I get is "Feature is ".
Thsi works fine when query.data.Results[0].IsFeatureEnabled is not null, but it fails otherwise.
The problem appears to be query.data.Results == null is never triggered. How do I check for a null object in retool javascript?
Code in Value box:
Feature is {{ query.data.Results == null ? "OFF" : (query.data.Results[0].IsFeatureEnabled ? 'ON': 'OFF') }}