Hi is there a way to display a column label via the Fields Content if the column does not contain a value?
You could create an if-then-else column, something like:
- If value is empty, then âNot setâ
- Else value
And then use that column in place of the value in the fields component
@Darren_Murphy thanks but does that mean creating a duplicate if-then-else column for every column if any column may be empty?
Yes, it would.
So if you have lots of them then itâs probably not a great solution.
Iâve not used the fields component much. Iâll have a look at it and see if there is a better option.
@Scotttiey - I just had a quick look, and now I can see why I donât use it. Itâs not very flexible, and you canât assign actions. Fine for a handful of columns, but not the best choice for any more than that.
How many columns do you have?
Iâd probably look to use something else, depending on what you need it to look like. Maybe a markdown table in a rich text component, or even coerce the columns into a list that could be used in a collection.
Usually what I do is a rich text component, powered by HTML that I generated from JavaScript. That gives me the ability to be flexible in cases like this.
However, you would need to combine all the info needed into a template column first.
Seems like overkill for a no-code platform ![]()
If only we have some sort of a basic table component for Pages, then my life would be much easier.
The final product from the process above looks somewhat like this.
Yeah, HTML is my choice for tables as well. Although I didnât suggest it in this case as I could see the opening to a rather deep rabbit hole looming ![]()
Iâm just curious - why would you use JavaScript to generate HTML? Is that to apply inline styling, orâŚ? ![]()
I have a list of info with some fields that can be empty. In some cases, I donât want to generate empty ârowsâ for fields that have no value, or in some cases clients tell me to make them âTBDâ for example.
With a template column and JS to handle an array I created from splitting the template column, I can be flexible on what to do with those empty values.
Also, wish the JS column allows more input variables ![]()
Pass it a JSON object, and then use JSON.parse() to unpack it. Then you can have as many variables as you want ![]()
Thatâs what I do with that Audit Log concept.
I agreeâŚthe Fields component doesnât cut it.
Yeah, but still have to pack it into a template column first haha.
Find it strange that this is missing. It creates a bad UX experience. A toggle option would be great on Fields, âShow label if column emptyâ as at least that gives users the option
Was this feature ever implemented? Is there a smoother solution now?
Itâs still somewhat at the same point as what has been discussed in this thread already.
