Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Access "last completed" token value?

Access "last completed" token value? il y a 1 an 1 jour #95099

  • lovepade
  • Portrait de lovepade
  • Hors ligne
  • Expert Lime
  • Messages : 93
  • Karma: 0
I want to use limesurvey to gather quarterly inputs from reports.

I want to show reports a welcome message saying something like: "Welcome - you last took this survey og Friday the 19th of april. If you submit new answers the previous answers will be overwritten".

I can use Expression Manager to save the current date in a hidden field. Then I can show that hidden field later - but It will just show the current date. I need to access the token attribute "completed"? How to do this? - It seems I can only access custom attributes fields?

Thanks
Andreas
L'administrateur a désactivé l'accès en écriture pour le public.

Access "last completed" token value? il y a 1 an 1 jour #95107

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 3813
  • Remerciements reçus 683
  • Karma: 328
If you are using the following settings:
- Allow editing responses after completion = Yes
- Enable token-based response persistence = Yes

A quick test indicates that this works:
Welcome - you last took this survey on {TOKEN:COMPLETED}...
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
L'administrateur a désactivé l'accès en écriture pour le public.

Access "last completed" token value? il y a 1 an 1 jour #95108

  • lovepade
  • Portrait de lovepade
  • Hors ligne
  • Expert Lime
  • Messages : 93
  • Karma: 0
Ahh - I didn't have those two settings enabled. THANKS

But this validation doesn't pass the Expression Manager test:
! is_empty(TOKEN:COMPLETED)

SO I can create a hidden question of type EQUATION, with {TOKEN:COMPLETED} as question?

And the as validation later have
hiddenQuestion != "N"

I can't seem to make this work right now. Any help appreciated
Dernière édition: il y a 1 an 1 jour par lovepade.
L'administrateur a désactivé l'accès en écriture pour le public.

Access "last completed" token value? il y a 1 an 1 jour #95117

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 3813
  • Remerciements reçus 683
  • Karma: 328
I think this:
! is_empty(TOKEN:COMPLETED)


Should be this:
TOKEN:COMPLETED ! = 'N'
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: lovepade

Access "last completed" token value? il y a 11 mois 4 semaines #95223

  • lovepade
  • Portrait de lovepade
  • Hors ligne
  • Expert Lime
  • Messages : 93
  • Karma: 0
Thanks - this works!
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.413 secondes
Donation Image