S123 repeat always starts minimal after satisfying relevant

1020
6
Jump to solution
05-17-2021 01:21 PM
LarryWiebe
Occasional Contributor

Hi All, @PhilipWilson (similar questions)

I have a survey defined with a setting of pages, then a repeat with an appearance or field-list and a relevant case that is not met until the user makes a select on the first page of the survey. 

When the user fills out the data to make the repeat relevant, the repeat always starts in minimal mode, I would like it to start as it would is the appearance had no value (expanded) as I present the user several options on the screen that they are required to select at least one. 

I have tried putting the repeat (no appearance) in a group (field-list) with the same results.  I am looking for a way to not have the repeat minimal when it becomes relevant.

I have attached a sample, remove the relevant statements to see the differences.

Thanks,

Larry

0 Kudos
4 Solutions

Accepted Solutions
DougBrowning
MVP Notable Contributor

Do you mean like this?  Then no I have found no way for it to start with 1 record.  When anything is not relevant it is '' so this makes sense really.

Relevant and repeat.gif

What you can do though is try the new visible column (body::esri:visible) to hide things.  I think that works since then it is just hiding the fields and not using relevant.  Just tested it on a simple one and it works.  Note this could then create a empty record when you do not want it to so test it.

Hope that helps

View solution in original post

LarryWiebe
Occasional Contributor

Thanks Doug, I was able to get the behavior I wanted using the body::esri:visible.  I always require at least one entry in the repeat so it works out perfect.  Thanks Again!

View solution in original post

emilperlt_rrc
New Contributor II

Hey @Philip-Wilson 

Is there any way to change this?

I'd like to use repeats that have no record by default when the aren't relevant. However, when they become relevant it would be preferred for them to expand automatically so that users are forced to enter values in required fields within the repeat. Otherwise, a user can bypass the required fields if they don't hit "+" when the repeat becomes relevant.

 

Thanks,

Emil

View solution in original post

Philip-Wilson
Esri Notable Contributor

HI @emilperlt_rrc,

No, it is not possible to change this behaviour. If you want the user to complete required fields in the repeat, you could set up a constraint on a note question or similar, so that a warning appears to say that you must complete the repeat section, by using a count of the repeats and setting the constraint to being >1.

Regards,

Phil.

View solution in original post

6 Replies
DougBrowning
MVP Notable Contributor

Do you mean like this?  Then no I have found no way for it to start with 1 record.  When anything is not relevant it is '' so this makes sense really.

Relevant and repeat.gif

What you can do though is try the new visible column (body::esri:visible) to hide things.  I think that works since then it is just hiding the fields and not using relevant.  Just tested it on a simple one and it works.  Note this could then create a empty record when you do not want it to so test it.

Hope that helps

LarryWiebe
Occasional Contributor

Thanks Doug, I was able to get the behavior I wanted using the body::esri:visible.  I always require at least one entry in the repeat so it works out perfect.  Thanks Again!

Philip-Wilson
Esri Notable Contributor

Hi @LarryWiebe,

What you are seeing is correct, if a repeat is not relevant and changes state, there will be no record created, as per Doug's comments this is expected, as non-relevant questions can not have values.

Regards,

Phil.

0 Kudos
emilperlt_rrc
New Contributor II

Hey @Philip-Wilson 

Is there any way to change this?

I'd like to use repeats that have no record by default when the aren't relevant. However, when they become relevant it would be preferred for them to expand automatically so that users are forced to enter values in required fields within the repeat. Otherwise, a user can bypass the required fields if they don't hit "+" when the repeat becomes relevant.

 

Thanks,

Emil

Philip-Wilson
Esri Notable Contributor

HI @emilperlt_rrc,

No, it is not possible to change this behaviour. If you want the user to complete required fields in the repeat, you could set up a constraint on a note question or similar, so that a warning appears to say that you must complete the repeat section, by using a count of the repeats and setting the constraint to being >1.

Regards,

Phil.

emilperlt_rrc
New Contributor II

@Philip-Wilson,

Thanks for the quick response and suggestion!

Emil