IF statement to check if crm_object query returns no results
SOLVE
So, we've built a programmatic email template for a client that queries a custom object for records matching certain criteria, then returns a bunch of fields of those records to be displayed in the email.
These custom object records are fed to Hubspot on a daily basis from an external system. There's days when the external system has no new records to feed, so the email would be sent with a blank section. So I'd like to use an IF statement to display fallback content in case no records were found. Here's the snippet of code where this happens. Piece in the red block is what I added to make this work, but it didn't seem to work.
I understood something like this should be possible, but I'm guessing this isn't it.
IF statement to check if crm_object query returns no results
SOLVE
Oh, figured it out. That suggestion made total sense, but seems like the crm_objects never returns a complete null result, even if there's no records that match the query. So it would always just render a white space in my email.
IF statement to check if crm_object query returns no results
SOLVE
Oh, figured it out. That suggestion made total sense, but seems like the crm_objects never returns a complete null result, even if there's no records that match the query. So it would always just render a white space in my email.