Conditional Repeat appearance

625
3
Jump to solution
02-09-2022 08:34 AM
GaryBowles1
Occasional Contributor III

I have a select_one question that returns Yes or No. I No is returned, i want my repeat that follows to have minimal appearance. If Yes is selected, I want the appearance field for the repeat to be empty forcing the user to enter a record in the repeat.

I have tried the following in the appearance field - if(selected(${leak_detect}, 'No'), 'minimal','')

I have tried that formula in a calculate question and then used the ${calc_field} in the appearance field

No luck with either.

My question is, can I make the appearance of a repeat be conditional based on the answer of a previous question?

Thanks,

--gary

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi @GaryBowles1,

No, this is not possible. The appearance column does not support expressions. There is no way to conditionally apply different appearances to the same question, repeat or group.

The only way you could achieve this to have two different repeats (different related tables) that have a different appearance, and then you make either one relevant based on the yes/no answer. But that would mean the data for those questions is stored in two different layers with different field names.

Regards,

Phil.

View solution in original post

0 Kudos
3 Replies
by Anonymous User
Not applicable

Hi @GaryBowles1,

No, this is not possible. The appearance column does not support expressions. There is no way to conditionally apply different appearances to the same question, repeat or group.

The only way you could achieve this to have two different repeats (different related tables) that have a different appearance, and then you make either one relevant based on the yes/no answer. But that would mean the data for those questions is stored in two different layers with different field names.

Regards,

Phil.

0 Kudos
GaryBowles1
Occasional Contributor III

Phil,

 

Thanks for the info. Is this something that is in the roadmap for S123? 

--gary

0 Kudos
by Anonymous User
Not applicable

Hi @GaryBowles1,

Not currently, given as per the XLSForm specification, the appearance column does not support expressions. If this changes in the XLSForm specification in the future, it could be supported in both field app and web app.

Regards,

Phil.

0 Kudos