Irrelevant Group Not to Clear Data Possible?

More
4 months 1 week ago #216064 by sodiumchl
I'm running a closed survey with
  • 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
Problem: Some of the groups relevance is dynamic via EM. Say, as example, the relevance of Group A depends on Question 1 in Group B. When the survey is updated, Group A may be rendered "irrelevant" temporarily by a mistake in the data entry of Question 1 in Group B. When this happens, all existing answers in Group A are erased! This is undesirable. 
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?

Please Log in to join the conversation.

More
4 months 1 week 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.
The following user(s) said Thank You: holch, sodiumchl

Please Log in to join the conversation.

More
4 months 1 week ago #216136 by sodiumchl
That's it. Thank you so much!

Please Log in to join the conversation.

More
4 months 1 week ago - 4 months 1 week ago #216141 by sodiumchl
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: 4 months 1 week ago by sodiumchl.

Please Log in to join the conversation.

More
4 months 1 week ago #216155 by DenisChenu

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.
 

I don't think it muts happen.
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

Please Log in to join the conversation.

More
4 months 1 week ago - 4 months 1 week ago #216180 by sodiumchl
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.
Last edit: 4 months 1 week ago by sodiumchl. Reason: typo

Please Log in to join the conversation.

More
4 months 1 week ago #216181 by DenisChenu

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.
 

OK : it's the desired behaviour.

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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now