Populate a field based on dropdown choice

Newbie to SugarCRM need the formula to populate a field based on a dropdown choice of another

Field1 Dropdown $Company = "Choice"

Field2 TextField = $Company_Address = "Choice"

  • Thank you Patrick... I saw that post and tried to make it work.  I don't think I explained myself...

    I have a dropdown with List with Company.  When User chooses the Company from the dropdown, I need a field to populate with the Company Address that is stored in another DropDown "Company_Address"

    So, if User chooses "Linda Company" from Company DropDown, then I need the associated Address to populate the field "Company Address"

    I don't know the formula, but Address = 

    Case when Company "Linda", then  "1 Main Street, City, State", when Company "Bob" then "2 Elm Street, City, State"

  • Hi Linda Souza,

    1. If the Item Names are identical between dropdown lists, then:

    getDropdownValue("Company_Address_list",$company_name_field)

    2. If the Item Names differ between the two dropdown lists, then make a third list that you don't use in a field. The Item Names in this new list should be identical to the Item Names in the Company_Name_list and the Display Labels for each need to match the Item Names in Company_Address_list that correspond to the addresses you want to display from Company_Address_list. Then:

    getDropdownValue("Company_Address_list",getDropdownValue("Company_Bridge_list",$company_c))

    Here is a series of screenshots to show an example of #2 above:

    company_c is the dropdown field where the user would select Linda or Bob.

    This is the dropdown list used in company_c. Note the Item Names Linda_Company and Bob_Company.

    Likewise, here is the dropdown list containing the addresses:

    Because the Item Names in the two dropdown lists differ, I had to make this 'bridge' dropdown list:

    Finally, here is the TextField calculated for the address:

    Note the formula:

    getDropdownValue("Company_Address_list",getDropdownValue("Company_Bridge_list",$company_c))

    I hope this helps!

  • I couldn't get #2 to work, so I made changes so the ItemName was the same (#1) and it worked.  Thank you so much!  I really appreciate it.