Velocity Check if Custom Object is Empty / Exists for Lead? | Community
Skip to main content
Level 5
February 21, 2025
Solved

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

  • February 21, 2025
  • 1 reply
  • 904 views

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?

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

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
February 21, 2025
#if ( $display.alt($digitalBankingProfileList,[]).isEmpty() ) Object does not exist #else Object exists #end
Level 5
February 21, 2025

Thank you!!