SOLVED

Velocity Check if Custom Object is Empty / Exists for Lead?

Go to solution
nhabischWings
Level 5

Velocity Check if Custom Object is Empty / Exists for Lead?

Hello!
Here with another probably basic question, but I am stuck on this.
We have an email that basically looks for data points within one custom object to "qualify" them for content and then looks at a second custom object to determine what content to show.

My issue is that there are cases where the second object does not exist / has no data for the Lead.
I tried doing something like this:

 

#if ( $digitalBankingProfileList.isEmpty() )
Object does not exist
#else
Object exists
#end

 

This is probably an inaccurate way to check as it results in showing the object as existing even on a Lead that clearly has no data in that object. I am assuming there's a better way to check for this?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity Check if Custom Object is Empty / Exists for Lead?

#if ( $display.alt($digitalBankingProfileList,[]).isEmpty() )
Object does not exist
#else
Object exists
#end

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity Check if Custom Object is Empty / Exists for Lead?

#if ( $display.alt($digitalBankingProfileList,[]).isEmpty() )
Object does not exist
#else
Object exists
#end
nhabischWings
Level 5

Re: Velocity Check if Custom Object is Empty / Exists for Lead?

Thank you!!