Expand my Community achievements bar.

SOLVED

query doubt

Avatar

Level 4

Can we create a query for submission date - current date = 7 days 
how can we add this quesry in AJO journey condition box 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

@MYSTERIOUSMAN 

If the data type of FormSubmissionDate is dateOnly, you can validate using the following expression

 

toDateOnly(toString(nowWithDelta(-7,"days"))) == #{ExperiencePlatform.leadinquiry.experienceevent.at(0)._abc_partner.FormSubmissionDate}

View solution in original post

12 Replies

Avatar

Community Advisor

@MYSTERIOUSMAN , Check this function if that works.

toDateOnly(toString(inNextDays(submissiondate,7)))==toDateOnly(toString(now())) 

Thanks, Sathees

Avatar

Level 4

Hi @SatheeskannaK 

toDateOnly(toString(inNextDays(#{ExperiencePlatform.leadinquiry.experienceevent.at(0)._abc_partner.FormSubmissionDate},7)))==toDateOnly(toString(now()))

Abhishektaya007_0-1699978010543.png


if is throwing an error can you have a look what to do 
this is the attribute  which we are taking it form AEP
#{ExperiencePlatform.leadinquiry.experienceevent.at(0)._abc_partner.FormSubmissionDate}

is there is any error plz lets us know

Avatar

Community Advisor

@MYSTERIOUSMAN It should work as long as FormSubmissionDate is datetime field. 

toDateOnly(toString(inNextDays(#{ExperiencePlatform.testFieldGroup.profile.timeSeriesEvents.at(0).extSourceSystemAudit.lastActivityDate},7)))==toDateOnly(toString(now()))

If not you will have to apply the conversion.

Thanks, Sathees

Avatar

Administrator

Hi @MYSTERIOUSMAN,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!



Sukrity Wadhwa

Avatar

Level 4

Hi @SatheeskannaK  

the attribute submission date 

Data Type is Date only can you helps us to form the query for that 

submission date = 7 days 

(Assume that 19-11-2023 i submitted form and send the mail after 7 days  and submission date is day 0  mail should be sent on. 27-11-2023)

Avatar

Correct answer by
Employee

@MYSTERIOUSMAN 

If the data type of FormSubmissionDate is dateOnly, you can validate using the following expression

 

toDateOnly(toString(nowWithDelta(-7,"days"))) == #{ExperiencePlatform.leadinquiry.experienceevent.at(0)._abc_partner.FormSubmissionDate}

Avatar

Employee

It does work.

For the sake of validation, I have hardcoded the submission date to 2023-12-09 and see the profile pass through.

 

toDateOnly(toString(nowWithDelta(-7,"days"))) ==toDateOnly('2023-12-09')

 

Reference-

dugganab_0-1702713487647.png