Only display one record from subtable in Server Connect on client side?

I have a Contact table that has an Email subtable. I’m pushing both in a Server connect. In the Email subtable I have one boolean named Default. I only want to show the email where Default = true.

Is there a way to filter this on the client side or do I need to create a separate Server Connect?

image

Could maybe use the .where formatter on the email array?

Nice. That might get me down to the one record, but how would I grab the email field in that record?

contact.data.getContact.Email.where(`Default`, true, '==')

Would this work?
contact.data.getContact.Email.where(`Default`, true, '==').Email

You could use a data view.

Thank you @Heather_Mann! A data view worked. :slight_smile:

The where formatter returns an array, so you’d [0].Email

1 Like