1. What is the issue? Please be detailed.
Main issues
- Enketo cannot display images against choices in a select_multiple or select_one if a
big-image
column exists and a choice filter is applied. Additionally the labels do not appear if the choice filter uses an instance lookup - Collect displays the wrong image every 9th option in a select if the correct images haven't been uploaded to Central
I have a list of items and each item has a 'drawing' column that lists the drawing ID or IDs that the items appear on (1/2/3 drawings in this case, space delimited). I have also split these values to 3 separate columns.
When selecting an item, and then showing the relevant drawing IDs in a select multiple to allow the enumerator to pick which to later annotate, the appearance varies with different ways of choice filtering and is also different in Enketo and Collect.
If I have no choice filter on the select_multiple
, which is impractical with so many drawings;
- In Enketo all possible options appear and the images are present, big-image zooms but scales to browser and distorts image if canvas is not the same aspect as the image (distortion previously reported)
- In Collect, strangely, while testing I only uploaded one image, (so the rest are broken links in Enketo,) however in Collect, that single image appears under the correct select option but also under 7 other options, but the other 54 options show
file /path/to/image.png is missing
as expected. I counted and it's every 9th row that is repeating the incorrect image. If I then upload the 18th image after the first one that is uploaded, then 1 is right, 9th is the 1st (wrong), 18th is correct, then all multiples of 9 after this show the 18th image (wrong).
Removing the big-image
column has no effect on the above behaviour
If I create a standard choice filter eg location=${location}
, which is not workable for my dataset, but only for testing
- in Enketo the filter applies, labels are visible, images are not shown
- In Collect the filter applies, labels are visible, images are shown, big-image works
Removing the big-image
column restores the images to the select in Enketo
If I store the drawing IDs in three columns DWG1/2/3
on the choices sheet and then choice filter as below with an instance lookup then
- Enketo does filter correctly but the labels are blank and there is no image.
- Collect filters correctly and labels and images are shown, big-image works
name=instance('item')/root/item[name=${item}]/DWG1 or name=instance('item')/root/item[name=${item}]/DWG2 or name=instance('item')/root/item[name=${item}]/DWG3
Removing the big-image
column has no effect on the above behaviour
If I calculate the drawing IDs as separate fields and then use those in the choice filter as below then
- Enketo filters correctly, labels are visible, but there is no image
- Collect filters correctly, labels and images are visible, big-image works
${D1} calculate as instance('item')/root/item[name=${item}]/DWG1
${D2} calculate as instance('item')/root/item[name=${item}]/DWG2
${D3} calculate as instance('item')/root/item[name=${item}]/DWG3
choice_filter as
name=${D1} or name=${D2} or name=${D3}
Removing the big-image
column restores the images to the select in Enketo
All the above scenarios are the same when modified to select_one
.
2. What steps can we take to reproduce this issue?
Try 1) choice filtering and 2) not uploading media as above
3. What have you tried to fix the issue?
various methods of choice filtering, select one and multiple
4. Upload any forms or screenshots you can share publicly below.
I will need to create a generic version of this form to share. Can do this if unable to reproduce.