Creation of a list on table after begin repeat

Hello to all,
now we are trying to format a list in table form, with radio buttons, with in line the observed floristic species (and entered in a previous begin-repeat) and in columns the 7 possible values of coding of the coefficient of dominance of each species according to the Braun-Blanquet scale (coded as: r (1 individual), + (<1 %), 1 (1-5 %), 2 (5-25 %), 3 (25-50 %), 4 (50-75 %), 5 (75-100 %)) Since here the point is to be able to adjust the value of this index as the observer wanders through the meadow, I thought I would choose this type of flexible appearance based on this figure by John B published on the forum in September 2013 [Table-list headings not aligned]

@MathieuBossaert, during our training session in mid-April, you discussed this type of table and your first tests at the CEN Occitanie for phytosociology surveys. Can you tell me more about it?
Do anybody have any advice on the implementation knowing that apparently there is half of the screen dedicated for the rows and the other half for the columns and because of this we were thinking of using a Globexplorer tablet for the input in the field.


Hi Sylvie ,

you will find information here about the question type :

And here about the fact that half the screen is dedicated to labels :

1 Like

Thank you @mathieubossaert for your answer which I delayed looking at because I was busy on another project.
The second floristic protocol has been instrumented via a new ODK form is a protocol of phytosociological surveys in 2 steps:
1°) Walk in the meadow and note all the species present
2°) Associate a coefficient of abundance dominance to each species according to the Braun-Blanquet scale. The coefficient associated to a given species can change during the survey because it is adjusted by the botanist according to the overlaps of the other species present.

Also I thought that the appearance of the #grid-of-selects-on-the-same-screen with appearance=list-nolabel could be well adapted to easily change the abundance class by the radio buttons. I would like to hijack the #grid-of-selects-on-the-same-screen function so that my rows correspond to the result of the select_one_from_file espece_flore_Oo.csv obtained in the previous question group. To do this I calculate this list of observed species by a computation with as parameter of computation: coalesce(${new_espece},${espece}) then I display this result of the selection of foristic species by a note with as label

Then I start this new group of questions to score the abundance using this list of observed species in rows (lines 44 to 47 of the attached v2 form).
FloreDeambulationV2.xlsx (19.2 KB)
But I get an error message: Error: expected <class 'openpyxl.styles.fills.Fill'>
Do you have an idea how to solve my problem?

PS: about the fact that half the screen is dedicated to labels, we want to use Globexplorer tablet. So with 7 classes of coefficient of abundance dominance used in radio buttons, I hope this is ok.

Thanks in advance and have a nice day under the sun.

Hi @SylvieLadet ,

you have an unexpected constraint on line 46 (a string with html tag instead of a logical test or nothing) :slight_smile:
Once removed, you'll get another error message about the repeat_count line 23 because nb_points does not exists.

Hi @mathieubossaert , thanks for your feedback. I have corrected these 2 errors on lines 46 and 23. But I still have an error when creating the xml. I think my filtering list_especes_observed in the constraint field is not working. I tried to write it in several forms: ${liste_especes_observees} in Constraint or ${liste_especes_observees} in Relevant... But nothing to do it does not work.

So I tried to follow your advice given during the training in April to "add only one information at a time in the Excel workbook in order to test progressively the progress of the form". So I wanted to test this #grid-of-selects-on-the-same-screen function by listing 2 floristic species from the following diagram

This would have allowed me to see the rendering on the tablet screen with half of the screen for the species and the other half for the radio buttons of the 7 abundance coefficients: cf lines 44 to 48 of the following form but here again I have the same error when generating the xml.
FloreDeambulationV2.xlsx (19.3 KB)

What do you think?

I think that if I manage to solve this problem, I can perhaps repeat this process on the 252 species present in the csv of the observed species (+ X other species) of which I will make the display only if the species is in list_especes_observees.

Idem what do you think?
Thank you for your precious help in my rise to autonomy on ODK.
Have a nice day

I think it can be managed in a generic way. Your proposal will work but you'll get at least 252 column to query after the collect. And on the tablet you will have quite big table to scroll.

You should create a repeat to ask the abundance of each species. The repeat iterates as many time as number of species.
For each iteration you can calculate the species input at the same iteration in the species inventory repeat (${espece_observee}) and then ask for its abundance. You'll need to calculate the rank (called num_espece in the form below) of each species of the list (calculation -> position(..))

Here is our form form such phytosociological monitoring, developed this spring by @Vivian_Inereli . We will present it in a more detailed post later. (2,7 Mo)

1 Like

Hi @mathieubossaert and @Vivian_Inereli ,

and thanks again for your feedback and suggestions.
I tested your form to understand its behavior on ODK collect.

I tried to adapt your phytosocio form to our case study (extracting only the lines that I thought necessary. In our protocol, there is no need to manage the different vertical strata. But I think I'm lost with the numerous calculate lines (and their syntax) of which, for some of them, I don't perceive their role (e.g. the calculate on selected_species...). And as a result my v3 form doesn't work and I can't debug it.

FloreDeambulationV2repetAbondance.xlsx (30.6 KB)

It's not easy: I tried an alternative (that I thought simpler and more operational) to reach our goal for this protocol: start from a group of questions that allows to select each species and its abundance coefficient. Then to propose a summary of the values of these 2 infos on the same note.

But I don't know how to write the syntax of this.
For example we enter 2 species:
acer campestre with r as coef value
bromus arvensis with 1 in coef value
the summary note of the species/observed abundance gives us that:
acer campestre_r
bromus arvensis_1

With this synthetic summary of all the observed species suffixed with their abundance value, if the observer decides to modify certain abundance values, he uses the 2nd icon on the top right to display the groups of questions to modify them.
What do you think about it?
Thanks for your patience


Hi Sylvie.
you just need a concatenation between the species and the abundance and use it to name your repeat (using a group just after the repeat)
Here is the form (I named the repeat the same way (espece-abondance)
I had to drop the search on species name because it was not working. I let you find the problem :wink:

FloreDeambulationV2repetAbondance.xlsx (14,9 Ko)

1 Like

Hi @mathieubossaert
It works. Thanks for your help again and again. Have a nice long 3 day weekend