I have a requirement in the journey that I creating. The requirement is to check on a date attribute to see if it is "y" days from current date i.e., let's say that "end_date" is 'xx-xx-xxxx xx:xx:xx' and it is equal to y days from today's date, then continue with the journey, otherwise end right there. When I pick the date field attribute and try to check if it is current_date + y days, I don't get the current_date option. It looks like the check will happen "y" days after when I create the journey. How do I implement the same in AJO?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Sathees,
I could not respond immediately. The above solution is partially correct. The right function for my use case is nowWithDelta.
toDateOnly(toString(nowWithDelta(90,'days')))=toDateOnly("2023-10-06T00:00:00")
Your note helped me find the working solution quicker.
Thank you,
Sirisha
@sirisha_ganti, Try this expression in the journey condition considering the end date is 4 days from today.
toDateOnly(toString(inNextDays(now(),4)))==toDateOnly("2023-10-06T00:00:00")
Hi Sathees,
I could not respond immediately. The above solution is partially correct. The right function for my use case is nowWithDelta.
toDateOnly(toString(nowWithDelta(90,'days')))=toDateOnly("2023-10-06T00:00:00")
Your note helped me find the working solution quicker.
Thank you,
Sirisha
I'm glad that it was helpful for you. Thanks for posting the solution that worked for your use case.
Views
Replies
Total Likes
Is there a way to calculate the difference from a field whose value is date, for example -
@{Myevent._xyz.subscription.expiry_date} - 90 'days'?
I want to use the above in a wait condition.
Thank you,
Sirisha
Views
Replies
Total Likes
@sirisha_ganti You can try setDays function. Remember wait activity will accept dateTimeOnly format.
setDays(toDateTimeOnly(@{Myevent._xyz.subscription.expiry_date}),-90)
Thank you for your reply. I will try it and get back.
Thank you,
Sirisha
Views
Replies
Total Likes
Hello @sirisha_ganti and @SatheeskannaK ,
Is it possible to change the '90 days' to a calculated value?
e.g. toDateOnly(toString(nowWithDelta(round(122/3),'days')))
I'm also not able to use a dynamic value here:
e.g. toDateOnly(toString(nowWithDelta(#{ExperiencePlatform.DateFields.profile._repo.createDate},'days')))
Thanks
Views
Replies
Total Likes
Hi @sirisha_ganti,
Was the given solution by @SatheeskannaK helpful to resolve your query or do you still need more help here? Do let us know.
Thanks!
Views
Replies
Total Likes
Hi Sukrity,
Thank you for the follow up. That was helpful.
regards,
Sirisha
Thanks for the update @sirisha_ganti!
Views
Replies
Total Likes