Dear Community
I am building a form, where I first ask the user ID and depending on this, the content of following questions is different. Since there are hundreds of users I store the data about the content of following questions in a file. The file is pullparcelcontent.csv header of the file is the following:
userID; countrydata; seeddata; seed1; seed2; seed3; …; seed10
1; France; a b d n w r t c a j; a; b; d; …; j
2; Germany; k g n a x t c o s w; k; g; n; …; w
…
In practice, the users are based in different countries and receive a unique selection of seeds and sow them in their garden.
As you may notice, the seeddata column is just a concatenated version of seed1, seed2, etc
The form has two aims:
- check if they received what I intended to send them (no packaging error)
- ask them to tell me in which order they sow the seeds to the 10 available spots they have
Aim 1. I can achieve as:
type name label calculation
integer userid Give your user ID
calculate parcel_content pulldata(‘pullparcelcontent’, ‘seeddata’, ‘gardenid_key’, ${userid})
note parcel_check The content of your garden should be ${parcel_content}. Check your seeds against this list it!
Aim 2. I am not sure how to read the columns seed1, seed2, etc as a list so I can use it in a select_multiple embedded in a repeat. The repeat count is 10, so they go through the 10 available spots and for each select a seed that they have sown there.
type name label repeat_count calculation choice_filter relevant
begin_repeat seeding_spots Choose from the list of seeds for each seeding spot! 10
select_multiple seed spot1 Which seed did you put at seeding spot 1?
select_multiple seed spot2 Which seed did you put at seeding spot 2? selected(?)
…
end_repeat
Q1: I am not sure how to read the columns seed1, seed2, etc to the name seed. I also tried select_multiple_from_file but again I could read one column at once only. Note that in reality I have more than 10 seeds.
Q2: I am also not sure what is the best way to reduce the seed list after each selection to the remaining seeds, maybe with selected() but again this would lead to very lengthy conditions?
I am looking forward to hearing from you with hints and solutions!
Tika