component condition on REST model to show existing rows with field!=null, but allow new empty rows.

I have a deck on a REST model. I’d like to use a component condition (thanks, Pat!) to eliminate the rows where a certain field is blank. However, I’d also like to be able to add new rows to the model using the deck component. If I apply the component condition, the new rows never show up…

Anyone have a good way around this without creating a whole new model just for new rows?

bump

Did you ever get this work? Can you give this field a temp value so that it doesn’t show up? Is it a picklist? If so, maybe adding a “None” value could work. Don’t think it will.

Or you can give it this default value and make saving disabled until all it’s got a row. Would likely need a snippet for the enabling, but it would work.

If you’re doing something along these lines, I would consider doing the context condition with a ui-only formula field where you can handle the logic. Like if I want Account = ACME or new rows to show, I would have a formula with {{account}}=="ACME" || {{Record.isNew}} and a context condition that looks for the field to be true.

1 Like