Cannot select more than one option from Lookup Table

Hello,

Uploaded lookup tables but cannot select more than one option from my checkbox lookup table in the form. Only the first option from each table is selectable. This is what happens when i try to select more than a single participant.

Hi,

When you configured your lookup table question it has a name field (IE: “Alice Attinnon”) and an id or value field where you specify what value is saved to the form when that question is selected.

What is the column in your lookup table you are using for the id/value field? It can’t have any spaces in it, so if you are using the name as the value it may be causing issues.

-Clayton

Hi Clayton,

So initially i had setup the lookup table like this since the id field couldn’t take spaces:

But when i exported the data in the form, all names were separated by an underscore even when the name belongs to a single participant and the form did not expand the boxes because the question allows for selection of a lot of participants.

Now i have changed to table to pull the client_name based on the dept_id that was selected in a previous question, this is what the lookup table looks like now:

A partcipant’s name is like firstname+middlename+lastname and i need an underscore to only separate names by partcicipant and not to separate all entities of a participant’s name.
if there are two participants i:e Clayton Sims and Jumai Muhammed, i would like to see the selection as Clayton Sims_Jumai Muhammed because then i can export to excel and expand using a delimiter. As is, the report shows Clayton_Sims_Jumai_Muhammed and its really not helpful.

How else can i restructure this table please?

Hi,

I forgot that the exports also use an underscore to delimit selected items, so it makes sense to not use the underscore to split up names.

I can think of two good options. One is to use another arbitrary character (like a “+” or “-”) to replace the spaces in the ID, and then find-and-replace them out post-export.

Another option would be to replace the spaces in the ID field with a “non-breaking space” or other Unicode whitespace character before upload. CommCare, Excel, and other data systems should treat those characters as if they were a non-whitespace character (like “+”), but visually they will appear as a space character. The downside will be that it will be quite difficult to identify when these characters are in use or not.

You can see an example here:
Jumai Muhammed
Jumai Muhammed

The second “space” is a unicode whitespace character, you can copy and paste it into a tool like this to see that it isn’t a “space”, but an “EN QUAD”.

-Clayton

Sorry, it looks like the forum once again is stripping out unicode characters and/or normalizing them, so it replaced my unicode space character with a plain space.

I put the example here instead (Sorry to anyone who finds this link in the future and it’s dead)

https://shrib.com/#HyrFnGQH2sgZx07bmeZw

-Clayton

Hi Clayton,

Unfortunately i cannot see it the way you have placed it in shrib, it asks me to get an account just to view it. But just so i am clear, should i try using it this way in my excel sheet for each participant’s name and re-upload into Commcare:

Jumai U+2000 Muhammed

You’ll need to actually copy and paste in the physical character itself, rather than the codepoint.

You should be able to copy the whitespace characters directly from the first link that I sent.

-Clayton

Hi Clayton,

When i copy the second space into the tool, it still identifies it as a space (0020) and not an EN QUAD(U+2000).

The tool identifies both instances of the name Jumai Muhammed as having spaces. Can you run yours and send me an image? Then maybe repost the name so i can copy the space again and test here. I really need this to work. Running out of ideas

Hi Clayton,

The other alternative i am trying to pursue is to create a repeat group based on the number of participants present and for each participant selected their associated properties like gender and district should be pulled from the lookup table.

image

I have tried this using items:list as you suggested previously but it didn’t work and when contacted by Dimagi rep i was told that the code below is actually correct but it still doesn’t pull the fields required.

instance(‘cohort_two_track_one_clients’)/cohort_two_track_one_clients_list/cohort_two_track_one_clients[client_name = #form/repeat_group/question6/participant_name]/gender_id

instance(‘cohort_two_track_one_clients’)/cohort_two_track_one_clients_list/cohort_two_track_one_clients[client_name = #form/repeat_group/question6/participant_name]/gender_id

Hi,

Unfortunately the tool won’t let me send over a Unicode space, but I can confirm I’m also seeing odd behavior with the second space from this page: http://jkorpela.fi/chars/spaces.html

The ones below (including en-quad) are working fro that page for me.

-Clayton

Hi,

What do you think about the alternative i am looking into? I have just sent a mail to Commcare about this, it seems there are quite a few bugs i have encountered with Commcare that are difficult to resolve?

If i could get this repeat group to work then i can ask the project for some time to restructure the entire survey, as of now the data coming in doesn’t make sense, it’s pulling all the names in a single column and still not able to pull associated properties of the participants selected.

Hi ,

Another error now:

image