Forum Discussion

AswinBabu's avatar
AswinBabu
Qrew Member
4 years ago

Creating dropdowns based on contains

I have 3 tables and in the child table, I want to have a conditional dropdown kind of behaviour. Let tables be A,B and C. A-<C(one A to many C) & B-<C (one B to many C). I want conditional drop down in which values in drop down of A depends on value selected in B. But the relationship between A and B is A-<B (one A to many B) so the normal conditional dropdown method is not possible in my case. I want to know whether I can code like when a particular word in a column of A appears, show records with that word in a particular column of B. 
Please let me know if this is possible.

------------------------------
Aswin Babu
------------------------------
  • If your relationship is setup so that A < B, why do you want the user to select the B record first when building a record on Table C? If you select an option from Table B, and B is related to only one record in Table A, there will be only one option in the Table A drop-down. If you can provide a bit more context (and some real examples of the data in the two tables) your request may make a bit more sense, but so far, it doesn't.

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------
    • AswinBabu's avatar
      AswinBabu
      Qrew Member
      Let the tables be Material Mix, Groups and Items. Material  Mix<Items and Groups<Items. Groups have different records like High Quality Leather, Low Quality Leather, High Quality Polyster, Low Quality Polyster etc. The examples for records in Material Mix are Leather India, Leather Pakistan, Polyster India, Polyster Pakistan, Jute India, Jute Bangaladesh etc.  so when I select group High quality polyester I want to see in drop downs records of Material mix Table like Polyster India, Polyster Pakistan. it's not possible through normal conditional drop downs technique since selecting group in form in Items initially is a must in our case. 
      Is there any way to make this possible though creating an additional table with just material name like polyester, jute etc only and use it to find records with that name in Material mix 
      Please guide me

      ------------------------------
      Aswin Babu
      ------------------------------
      • BlakeHarrison's avatar
        BlakeHarrison
        Qrew Captain
        Yes, the only way you can do what you're wanting to do is to have another table for Materials (Polyester, Jute, etc).  For this setup, you'll probably want your structure to look like this:

        Raw Materials would be Leather, Polyester, Jute, etc. Materials would end up being what you're calling Items (the name doesn't matter, though). In that Materials/Items table would be where you would set up your Conditional Drop-Down fields. Your users would first select the Raw Material and then drop-downs for Material Groups and Material Mix would be dependent upon the Raw Material selected.

        ------------------------------
        Blake Harrison
        bharrison@datablender.io
        DataBlender - Quick Base Solution Provider
        Atlanta GA
        404.800.1702 / http://datablender.io/
        ------------------------------