1 Reply Latest reply on May 30, 2014 6:29 AM by philmodjunk

    Retrieving data

    AdamRoberts

      Title

      Retrieving data

      Post

           I am missing something really simple as I have been stuck on this for over an hour, help would be appreciated

           I want to populate a field call 'Number' in table 1 from a field in a row in Table 2 called "sales".

           In table 1 and Table 2 I have a Fields named "Week" and  "Day" 

           Therefore when I add the Week and Day in Table 1, I want it to go to table 2 and find the "sales" from the row with that week and day, and then return that number to the "Number" field in table 1 

           I have been trying to use an EQL quire 

        • 1. Re: Retrieving data
          philmodjunk

               ExecuteSQL could be used for this, but it's not really needed.

               Define this relationship in Manage | Database | Relationship:

               Table 1::Week = Table 2::Week AND
               Table 1::Day = Table 2: Day

               Then you can place the Sales field from Table 2 on your table 1 layout to show the sales once you enter a week and day in the current record of table 1 that matches to a record in Table 2. If you need to physically copy this data (don't do this unless you have a specific reason), you can use auto-enter field options on a field in Table 1 using either the looked up value option or a calculation to copy over the sales value from the matching record.