2 Replies Latest reply on Jul 14, 2009 12:33 PM by LaRetta_1

    Performing a find within a calculation



      Performing a find within a calculation


      Hello, I'm a little bit new to calculations and could use some help.  One of my layouts of Table X is intended for user input and requires the user to select a company (from a value list of company names in Table Y) that they want to do business with.  On my layout of Table X, I only want to capture the companyID from Table Y.  I am hoping that if the value list pops up and the user selects a company name, I can perform an auto-enter calculation that will enter the correct CompanyID for that company name.  Does this sound like a reasonable thing to be doing from a database design perspective?  Any ideas how to do this?  Thanks--

        • 1. Re: Performing a find within a calculation
             If I understand correctly, you want the user to select the Company Name, but you only want to save the Company ID?  First thing that comes to mind is to setup the value list to use the Company ID as the primary value, the Company Name as the secondary, and only display the secondary value.  Use this value list on the Company ID field in Table X;  The user can select the company name, but afterwards, the ID is what is shown/stored.
          • 2. Re: Performing a find within a calculation
               Yes correct.  And be sure that you use a pop-up value list and not a drop-down ... drop-downs don't allow inserting the ID and displaying the name like pop-ups do.  Also drop-downs can allow a User to type something incorrect into the ID field (free text) whereas pop-ups naturally restrict to valid IDs.