revaturelabs / AchievementUnlocked

2 stars 2 forks source link

Create formula field to get eligibility for retake based on days since the most recent attempt was made #87

Closed LaughterJerry closed 3 years ago

LaughterJerry commented 3 years ago

attemptDaysLimit = [0,1,14,30,90,120];

let attemptList = voucher.attempts

let numOfAttempts = sizeof(attemptList)

attemptDate = attempts[-1].createdOn

if (attemptDate + attemptDaysLimit(numOfAttempt) > todaysDate){ Text = "soand so is currently ineligable until the " + attemptDate + attemptDaysLimit(numOfAttempt); } else { text = " so and so is currently eligable to (re)take the exam"; }