Select to view content in your preferred language

How do I solve Grid theme Column inconsistencies?

1364
2
Jump to solution
11-04-2019 10:46 PM
GeorgeJoubert
Occasional Contributor

I have been experiencing problems with the grid theme on a multi page survey with multiple groups. 95 % of the time the grids works fine with different columns, but then I get cases that the number of columns gets all wacky and does not follow the design.

Is there a way to see how the number of columns are configured and correct the error, because shifting the fields around or playing with the number of columns is very time consuming.

In the example attached you can see the group appearance is set to "w4 field-list" (Activate the last page by selecting RMU yes on Page 3)

Line 107 appearance is set to "w2 minimal" but in the servey it appears as "w3"? (Last page on survey)

This is not the first time I am experiencing this problem, I have previously just worked around the errors. I need to compile over a 100 equipment related surveys and this is a real concern. (Is there some rules that I am missing for using Grid Theme?)

Any assistance will be appreciated. 

George

0 Kudos
1 Solution

Accepted Solutions
BrettStokes
Esri Contributor

Hi George,

The problem you’re experiencing is due to the relative width (‘w’) parameter of non-relevant questions. You are using a ‘select_one or other’ question on line 107 of your XLSForm. If ‘Other’ is selected from the ‘Rated Normal Voltage’ an additional control becomes visible so that the user can ‘Specify other’. This is effectively adding a placeholder question with a relative width of ‘w1’ that only becomes relevant (and visible) if the answer to the previous question is ‘Other’.

As a result, the ‘Switchgear Fuse Rating’ question can no longer fit on the row and is placed on the next row, so the ‘Rated Normal Current’ question expands to occupy the remainder of the row (ie ‘w3’).

This additional ‘w1’ control doesn’t fit in with the remainder of the survey’s w2 and w4 questions so things get shuffled around in an undesired manner. You will also see this behaviour if you have non-relevant questions with relative widths that don’t allow the following question to fit on the row.

My suggestion is to define the group as 'w2' and assign 'w1' to those questions you want to occupy half of the row. This way the additional ‘w1’ Other question fits evenly into the survey. If it is visible, the remaining questions get pushed by an amount that allows them to fill the rows nicely.

Hope this helps,

Brett

View solution in original post

2 Replies
BrettStokes
Esri Contributor

Hi George,

The problem you’re experiencing is due to the relative width (‘w’) parameter of non-relevant questions. You are using a ‘select_one or other’ question on line 107 of your XLSForm. If ‘Other’ is selected from the ‘Rated Normal Voltage’ an additional control becomes visible so that the user can ‘Specify other’. This is effectively adding a placeholder question with a relative width of ‘w1’ that only becomes relevant (and visible) if the answer to the previous question is ‘Other’.

As a result, the ‘Switchgear Fuse Rating’ question can no longer fit on the row and is placed on the next row, so the ‘Rated Normal Current’ question expands to occupy the remainder of the row (ie ‘w3’).

This additional ‘w1’ control doesn’t fit in with the remainder of the survey’s w2 and w4 questions so things get shuffled around in an undesired manner. You will also see this behaviour if you have non-relevant questions with relative widths that don’t allow the following question to fit on the row.

My suggestion is to define the group as 'w2' and assign 'w1' to those questions you want to occupy half of the row. This way the additional ‘w1’ Other question fits evenly into the survey. If it is visible, the remaining questions get pushed by an amount that allows them to fill the rows nicely.

Hope this helps,

Brett

GeorgeJoubert
Occasional Contributor

Hi Brett,

That makes sense, I will keep it in mind with the following surveys and put it to the test.

I did however managed to fix it yesterday in the same manner as you suggested.

Thank you once again for the feedback as I have overlooked that possibility. 

The documentation on the grid functionality is not easy to find.

Kind Regards,

George

0 Kudos