Lookup on Dropdown presents ID Number not String Value

Lookup on Dropdown presents ID Number not String Value

I know this has been addressed in at least these two posts:


... but the offered answers don't seem to address/remedy my situation.

I have two forms: Agents and Agency. Agents has a dropdown that lets you select available Agencies. Using the following code in the Agents form under Field Actions>Agency>On User Input, the Agency contact information fields pre-populate on the Agent form.

if(Agency[ID == input.Agency].count() > 0)
{
x = Agency[ID == input.Agency];
//input. refers to fields in current form
input.Agent_Street = x.Agency_Street;
input.Agent_City = x.Agency_City;
input.Agent_Province = x.Agency_Province;
input.Agent_Postal_Code = x.Agency_Postal_Code;
}

All worked well when I had Agency_Postal_Code set up as a single line text field. To minimize user entry errors, I changed Agency_Postal_Code to a dropdown that provided a defined list of two-letter abbreviations for the provinces and states.

The instant I did that, the pre-populated Agent_Postal_Code field became a long ID number, rather than the assigned two-letter state/province abbreviation.

Ideas on how to get the string value back?

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now