Skip to main content

Hi All, I am trying to use a relative Date Filter. Using the UI it seems I have to specify a specific date or use IS WITHIN operator which for my use case won't work as it has fixed values in the drop down with the oldest being 1 year and I need the opposite (IS OUTSIDE). My business requirement is after a moving/relative date i.e.

 

GDPR_Latest_Date__c < N_MONTHS_AGO:18

 

How do I do that please?

 

#Data Management  #Salesforce Admin

1 respuesta
  1. 21 sept, 20:50

    Hi David,

    The Salesforce Data Mask app's standard filter UI evaluates criteria as literal static dates (e.g., > 2023-04-17) and does not natively support dynamic relative date literals like N_MONTHS_AGO:18 or IS OUTSIDE operators directly in the dropdown configuration.

    To achieve a moving or relative date filter (such as records where GDPR_Latest_Date__c < N_MONTHS_AGO:18), the standard workaround is to use a Formula Field on the object. 

     

    1.Create a Formula Field on the Object:Formula Creation. 

    Create a new Formula field (with a checkbox return type) on your Lead object. Use the TODAY() function combined with date math to flag records older than 18 months. 

     

    2.Add the Date Comparison Logic:Formula Logic. 

    Use a formula like: GDPR_Latest_Date__c < ADDMONTHS(TODAY(), -18) 

     

    3.Filter by the Checkbox in Data Mask:Data Mask Configuration. 

    Return to the Data Mask configuration UI, replace your date field condition, and instead filter by your new formula checkbox field equals True. Because this is evaluated dynamically based on TODAY(), it will always respect your moving 18-month window.

0/9000