- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Access "last completed" token value?
- lovepade
- Topic Author
- Offline
- New Member
Less
More
10 years 11 months ago #95099
by lovepade
Access "last completed" token value? was created by lovepade
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
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
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
10 years 11 months ago #95107
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Access "last completed" token value?
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:
- Allow editing responses after completion = Yes
- Enable token-based response persistence = Yes
A quick test indicates that this works:
Code:
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.
The topic has been locked.
- lovepade
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
10 years 11 months ago - 10 years 11 months ago #95108
by lovepade
Replied by lovepade on topic Access "last completed" token value?
Ahh - I didn't have those two settings enabled. THANKS
But this validation doesn't pass the expression manager test:
SO I can create a hidden question of type EQUATION, with {TOKEN:COMPLETED} as question?
And the as validation later have
I can't seem to make this work right now. Any help appreciated
But this validation doesn't pass the expression manager test:
Code:
! 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
Code:
hiddenQuestion != "N"
I can't seem to make this work right now. Any help appreciated
Last edit: 10 years 11 months ago by lovepade.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
10 years 11 months ago #95117
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Access "last completed" token value?
I think this:
Should be this:
Code:
! is_empty(TOKEN:COMPLETED)
Should be this:
Code:
TOKEN:COMPLETED ! = 'N'
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: lovepade
The topic has been locked.
- lovepade
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
10 years 11 months ago #95223
by lovepade
Replied by lovepade on topic Access "last completed" token value?
Thanks - this works!
The topic has been locked.