try({../Table.props.selection.data[0].Name}, " ")
I have this code bound to a text prop on a label in perspective. After moving the view into an embedded view, the label starts with a text null found and bad quality error on it. It is an eye sore, what is the reason?
The try()
function substitutes an alternative when a nested expression produces an error, but a null is not an error. And, it so happens, that Perspective property names/indices/object keys that don't exist don't throw an error. They return null, instead.
You likely need to use the coalesce()
function instead of try()
, or perhaps use both of them.
1 Like
try(coalesce({../Table.props.selection.data[0].Name}, " "), " ")
I am not sure if this is the proper way to use coalesce with a try, but it seems to have worked!
2 Likes