Hey everyone! I'm relatively new to using Survey123 and XLSForms, so I'm going to ask a question that's been asked a million times before, I'm sure, but I did a lot of looking around and my understanding of how Survey123 & XLSForms is so un-sophisticated that I was just getting lost. Apologies for being repetative here.
Problem statement: I want to do a multiple level lookup so that when I select "Job", "Phase", and "Team member" that my next drop down has the default value for that person's role on that job and phase, BUT if a user wants to change their role, they can, using a drop down.
My effort so far: I created a CSV file that will have all the jobs and all the phases and all the people (right now it's just a sample set for testing), and then created a column that concatenated those and assigned them each roles. Again, right now this is purely dummy data for testing.
In my XLSForm, I have a drop down for job (general_job), a drop down for phase (general_phases), and a drop down for people (labor_level1). Next, I created a text field that displays a concatenation which combines the displayed labels for each of those things, using the jr:choice-name command:
concat(jr:choice-name(${general_job},'${general_job}'),jr:choice-name(${general_phases},'${general_phases}'),jr:choice-name(${labor_level1},'${labor_level1}'))
Everything so-far, so-good.
My next step was to add a calculation to the dropdown question and ideally it should work. One thing to note is that I'm still going on displayed values rather than the name, because in the CSV I don't want to have to include the funny name of the label.
pulldata('rolespulldata','role','concatlookup', jr:choice-name(${labor_concatlookup},'${labor_concatlookup}'))
However, when I put in the pulldata calculation into the role selection question, I'm not getting any response. Nothing. I even tried copying the calculation into a text field to see if there was some conflict between the possible values in the drop down vs the values in the CSV file, but still nada.
I'm attaching the XLSForm and the CSV to see if you guys have any ideas. Thanks again for your help!