Relevancy condition of an OR statment that wouldnt throw an error if one of the question names it refered to wasnt there?

1. What is the issue? Please be detailed.

Is there a way to word a relevancy OR condition so that it wouldnt throw an error even if there was a reference to a question that didnt exist in the survey?

Reason why I hesitate to ask this possibly stupid question is we are creating a generic survey that contains many questions that might be removed when users customize it for use in the field. Ideally the user wouldnt have to change the relevancy condition(s) that referred to the deleted questions.

For example, in this questionnaire examplewithbothquest.xlsx (17.6 KB) , Quest3 has the relevancy "selected(${Quest1},'1') or selected(${Quest2},'1')".

When Quest2 is removed, like in examplewithoutonequest.xlsx (17.5 KB), then the error message (below) appears. Asking here for a way of wording the relevancy so that it wouldnt throw an error if Quest2 was removed.

Is this a limitation of xlsform/xpath or more likely a limitation of my brain power?

Any wise words on how to work this around? Muchas Gracias.

I don't think this is a good solution per se, but you could write your relevance statement as an excel formula, and then adding or removing a row would let it rebuild the statement.

It is prone to being broken when editing the xlsx form however, so this should be used with caution.

1 Like

muchas gracias. it's not the elegant solution i was hoping for but it is way more solution than i had. thanks.

when all you have is an xlsxform everything looks like an excel formula!

1 Like