Rich M Posted January 31, 2019 Share Posted January 31, 2019 What is the best way to choose a company name in a drop-down list in one field and have another field display that company's logo? I originally coded this process many years ago using a calculation field and series of "case" statements within the field definition. That worked fine when there were only a handful of choices. However, now that this list has expanded to 20+ companies, adding new companies and their logos to the list is extraordinarily cumbersome. The logos themselves are stored as Global fields in a related table. There are four separate fields within each customer's record where I need to do this. There has to be a better way to do this via a script instead of a calculation field, but I'm not sure of the best way to approach this. Help will be appreciated! Link to comment Share on other sites More sharing options...
Fitch Posted January 31, 2019 Share Posted January 31, 2019 No script needed, no calculation needed. I would set up a relationship to a company table with a logo field and then just display the related logo. Welcome to FM Forums! Link to comment Share on other sites More sharing options...
Rich M Posted January 31, 2019 Author Share Posted January 31, 2019 Thanks for the quick reply, Fitch. I'm not sure I fully understand what you've told me. Can you explain in a bit more detail? Do you mean I should set up a separate table for each company and it's logo? Link to comment Share on other sites More sharing options...
comment Posted January 31, 2019 Share Posted January 31, 2019 (edited) 1 hour ago, Rich M said: Do you mean I should set up a separate table for each company and it's logo? No. A separate table of Companies - where each company will be a record, with fields for CompanyName and Logo - and, preferably, a CompanyID (an auto-entered serial number). In your existing table, populate a field with the selected company's CompanyID, and show the corresponding logo using a relationship matching on CompanyID. Edited January 31, 2019 by comment Link to comment Share on other sites More sharing options...
Rich M Posted January 31, 2019 Author Share Posted January 31, 2019 OK! GOT IT! The BIG LIGHT BULB just lit up above my head! Thanks very much! Now I've got work to do... Link to comment Share on other sites More sharing options...
Rich M Posted February 1, 2019 Author Share Posted February 1, 2019 Fitch and comment, thanks so much for your help. This project is done, up and running fine, using your suggestions. MUCH easier than my old way of doing this! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 1904 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now