Possibility of Creating a Default Value for a Multiple Choice Question Using Logic

Hi! I have a CommCare application with the following multiple choice questions:

You have reached the end of the form. Would you like to close this case? (represented by the variable close_case)
1, Yes
0, No

Closing this case will remove the participant's name and their details from the list and you will no longer be able to access them. Are you sure you want to close this case? (represented by the variable close_case2)
1, Yes
0, No

If I want to set up a default value in the logic or the second question, such that the default value is "1, Yes" if the answer to the first question is "1,Yes" and "0, No" otherwise, would it be possible?

I wrote this logic in the Default Value question:

if (#form/close_case='1', '1', '0') but I got the following error message:

"You are referencing a node in this form. This can cause errors in the form"

Is there an error in my syntax or any way around this? Any input regarding this would be much appreciated. Thanks!

Unfortunately you can't generally use Default Values to populate questions in a form based on earlier user-provided answers.

It sounds like the second question is only relevant if the first one is answered, though, is there a reason why the second question doesn't just have a Display Condition that hides it from view?

Hi @Clayton_Sims, the second question actually does have to appear, as we want our data collectors to confirm that they indeed intend to close the case. If we just have the first question, data collectors may unintentionally close a case. Do you have any suggestions for a workaround?

I think I'm not quite understanding, still. If the answer to "Do you want to close the case" is "No", why would the user see the question ( close_case2 ) "Are you sure you want to close the case?"

A display condition will still have the user see the "Confirm Close" question if the user answers "Yes" to "should the case close," they just won't see it if their previous response was not to close the case.