I have a survey where, depending on whether someone has responded to a block before and whether 365 days have passed since then, they should either skip it or see it.
I’m using a directory for authentication and saving the last completion date as MM_LastSurveyDate to compare with current date.
MM_LastSurveyDate = empty → in the beginning of survey flow
MM_LastSurveyDate = ${date://CurrentDate/Y%2Fm%2Fd} → when they complete that survey and it is recorded in the directory. This embedded field exists after the block in question is completed so it updates in the directory. The set up for the update is already done and working.
I’m struggling to set up the 365-day condition, because I don’t know how to calculate the difference between two dates and how to add it into the survey flow.
For more context, I haven’t used JavaScript before, so I have no idea what I’m doing. I tried to set this up in the survey flow with embedded fields, but had absolutely no luck.
Heeelp pleaseee