Deba_Ghosh
(Debashis Ghosh)
September 12, 2021, 5:49pm
1
Hi I need help on how to create a simple look up table with two dependent values
field 1 Field 2
A B
A C
D E
D F
So, when I choose A in field 1, only the options B & C are available in drop down
ayogi
(Ashish Kumar Yogi)
September 13, 2021, 5:32am
2
Not sure if I understand this correctly but you can create two lookup tables.
Table1 shoul have only Field1 values (ie A, D ... as items).
This table should be used for one question to select option from Field1 only.
Have another table which should contain the table you've mentioned:
A --> B
A --> C
D --> E
D --> F
Based on the value selected for question of table1,you should filter out the value of options in table 2.
Deba_Ghosh
(Debashis Ghosh)
September 13, 2021, 7:23am
3
can I have your email id ?
Deba_Ghosh
(Debashis Ghosh)
September 13, 2021, 8:44am
4
how to create a table for terms ?
"you can create two lookup tables.
Table1 shoul have only Field1 values (ie A, D ... as items)."
ayogi
(Ashish Kumar Yogi)
September 13, 2021, 9:25am
5
Consider this example:
I have two tables :
first table is of 'vaccine type' and other is vaccine_type_configuration (As shown in image)
Now in my form, I have a question where I am asking the type of vaccine, where I am asking which vaccine type beneficiary wants (as shown in image)
Once the user has selected the type of vaccine, I am asking for the Dose Number for the selected type of dose (as shown in image)
You can see the filter condition is 'vaccine_type = {{question-id of vaccine_type question}}'
Here is the resource for setting up lookup table if thats what is troubling you :
https://confluence.dimagi.com/display/commcarepublic/Lookup+Tables