Add conditional expressions in Data Schema | Community
Skip to main content
CampaignerForLife
Level 5
Jul 26, 2023 8:27 AM UTC
Solved

Add conditional expressions in Data Schema

Is there any way to add a conditional expression to an Campaign Classic data schema?
For example: 
<attribute expr="[operation/@end]" label="Max Date" name="maxDate"
type="date"/>


To check if Operation/@end is later than today's date, and depending on it, set one value or another 

 

Thank you in advance!!

@_manoj_kumar_ @parthasarathy @parvesh_parmar @davidkangni

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ParthaSarathy
ParthaSarathyAccepted solution
New Participant
Jul 26, 2023 8:50 AM UTC

Hi @campaignerforlife ,

you can try below

<attribute expr="Iif([operation/@end] &lt; GetDate(),'Campaign End date has crossed' ,'' )" label="Campaign end date check" name="campaignEndDateCheck" type="string"/>

 

 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups

1 reply

ParthaSarathy
ParthaSarathyAccepted solution
New Participant
Jul 26, 2023 8:50 AM UTC

Hi @campaignerforlife ,

you can try below

<attribute expr="Iif([operation/@end] &lt; GetDate(),'Campaign End date has crossed' ,'' )" label="Campaign end date check" name="campaignEndDateCheck" type="string"/>

 

Translate
 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups