I have a text box that I use to display contact information for a dealer once that dealer has been selected from a drop down box. I am using the following:
When you say that you'd like it to 'not display anything at all' do you mean that you want those lines to be removed from the text or that you want the whole text item to be blank?
In that case I think you just need to update your ternary conditions to check instead for null/blank/undefined values instead of just seeing if the property exists. Something like:
Another option is to use the key value component which will do this for you automatically. Any field that is set up to be shown, if it is null it won't appear.
If after your initial setup, your query 27 should return new values that haven't been configured, it will automatically show them in your component, so you may end up with key/values showing up that you didn't plan to show.
Just something to bear in mind as your queries/schemas evolve.
This may be also a feature request for the retool team, for new keys to be by default hidden. @Darren
@MiguelOrtiz: I feel like the component should display whatever source data that is specified and update dynamically in response to any changes in that data. If there is ever a need to filter the input data in a meaningful way, I'd recommend putting a transformer between the two.