Hi!
I need to send an email that is not linked to a survey but an embedded data (it is a date field) of the participant. Is there any workaround i can do for this?
Thank you in advance!
Hi!
I need to send an email that is not linked to a survey but an embedded data (it is a date field) of the participant. Is there any workaround i can do for this?
Thank you in advance!
Best answer by Deepak
Something like this
function codeTask() {
var lastDate = "~{qde://supplemental.embeddedData.LastDate}";
var currentDate = new Date();
currentDate.setDate(currentDate.getDate() - 4);
var lastDateParts = lastDate.split("/");
var lastDateObj = new Date(lastDateParts[2], lastDateParts[0] - 1, lastDateParts[1]);
if (lastDateObj <= currentDate){
return {
result: "true"
}
}else return {
result: "false"
}
}
You can then use the result value of true as condition before email task, also update last date embedded data from piped text as required. It would look like below:

Hope it helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.