- Posts: 57
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Irrelevant Group Not to Clear Data Possible?
- sodiumchl
- Topic Author
- Offline
- Senior Member
Less
More
2 years 10 months ago #216064
by sodiumchl
Irrelevant Group Not to Clear Data Possible? was created by sodiumchl
I'm running a closed survey with
Question: Is there any way to change the above behavior, i.e., not to clear its answers when a group is dynamically rendered irrelevant? If not via survey configuration, can someone please let me know which file/function in the source code that determines this behavior? Or is it possible to change this via a plugin?
- Enable token-based response persistence: On
- Allow multiple responses or update responses with one token: On
- Format: Group by group
- Version 3.25.14+210218
Question: Is there any way to change the above behavior, i.e., not to clear its answers when a group is dynamically rendered irrelevant? If not via survey configuration, can someone please let me know which file/function in the source code that determines this behavior? Or is it possible to change this via a plugin?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
2 years 10 months ago #216111
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Irrelevant Group Not to Clear Data Possible?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: holch, sodiumchl
The topic has been locked.
- sodiumchl
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 57
- Thank you received: 1
2 years 10 months ago #216136
by sodiumchl
Replied by sodiumchl on topic Irrelevant Group Not to Clear Data Possible?
That's it. Thank you so much!
The topic has been locked.
- sodiumchl
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 57
- Thank you received: 1
2 years 10 months ago - 2 years 10 months ago #216141
by sodiumchl
Replied by sodiumchl on topic Irrelevant Group Not to Clear Data Possible?
There is another issue, though. Say Group A has a question Q1, and Group C has a reference to it {Q1.NAOK}. When Group A is rendered "irrelevant" temporarily, {Q1.NAOK} is empty, so it is still effectively cleared in Group C, even with deletenonvalues=0. Is there any way to "fix" this? Thanks again.
Last edit: 2 years 10 months ago by sodiumchl.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
2 years 10 months ago #216155
by DenisChenu
If user already enter something in Group C : it must not be deleted.
If you can reproduce with a simple survey : best is to report the issue.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Irrelevant Group Not to Clear Data Possible?
I don't think it muts happen.There is another issue, though. Say Group A has a question Q1, and Group C has a reference to it {Q1.NAOK}. When Group A is rendered "irrelevant" temporarily, {Q1.NAOK} is empty, so it is still effectively cleared in Group C, even with deletenonvalues=0. Is there any way to "fix" this? Thanks again.
If user already enter something in Group C : it must not be deleted.
If you can reproduce with a simple survey : best is to report the issue.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: sodiumchl
The topic has been locked.
- sodiumchl
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 57
- Thank you received: 1
2 years 10 months ago - 2 years 10 months ago #216180
by sodiumchl
Replied by sodiumchl on topic Irrelevant Group Not to Clear Data Possible?
Attached is an example (with deletenonvalues=0 set in config.php).
Steps to reproduce the problem:
1. Goto https://{siteURL}/{sid}, select No for Question a in Group A, and some text for Question B in Group B. Next to Group C and submit.
2. Goto https://{siteURL}/{sid} again, select Yes for Question a in Group A. Group B is now hidden. Next to Group C and discover that {Qb.NAOK} is empty even though Qb retains its value in the database.
See also attached screenshots.
Steps to reproduce the problem:
1. Goto https://{siteURL}/{sid}, select No for Question a in Group A, and some text for Question B in Group B. Next to Group C and submit.
2. Goto https://{siteURL}/{sid} again, select Yes for Question a in Group A. Group B is now hidden. Next to Group C and discover that {Qb.NAOK} is empty even though Qb retains its value in the database.
See also attached screenshots.
Last edit: 2 years 10 months ago by sodiumchl. Reason: typo
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
2 years 10 months ago #216181
by DenisChenu
deletenonvalues don't delete value in DB but : if a question is hidden by relevance : answer is empty in any condition for user.
You need another system, maybe with some :
- Hidden question at start (use for var)
- Equation in G2
Hidden question : showQb as short text
Equation in G2 : {showQb=Qb.NAOK} after Qb
The when you move out to G2 : showQb is set and don't disappear.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Irrelevant Group Not to Clear Data Possible?
OK : it's the desired behaviour.Attached is an example (with deletenonvalues=0 set in config.php).
Steps to reproduce the problem:
1. Goto https://{siteURL}/{sid}, select No for Question a in Group A, and some text for Question B in Group B. Next to Group C and submit.
2. Goto https://{siteURL}/{sid} again, select Yes for Question a in Group A. Group B is now hidden. Next to Group C and discover that {Qb.NAOK} is empty even though Qb retains its value in the database.
See also attached screenshots.
deletenonvalues don't delete value in DB but : if a question is hidden by relevance : answer is empty in any condition for user.
You need another system, maybe with some :
- Hidden question at start (use for var)
- Equation in G2
Hidden question : showQb as short text
Equation in G2 : {showQb=Qb.NAOK} after Qb
The when you move out to G2 : showQb is set and don't disappear.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.