4 Replies Latest reply on Nov 4, 2009 10:50 AM by chant50

    Can't send email from one table using info from another . . .

    chant50

      Title

      Can't send email from one table using info from another . . .

      Post

      Here's my problem. I have a table (and layout) called Book_Library. Another table (and layout) called Students. In the Book_Library Table I have a field called Student_Serial and it is related to the Students table to a field called Serial_Number. Looks like this:

      Book_Library::Student_Serial  related to Students::Serial_Number.

      In the Book_Library layout I made the Student_Serial field a DROP DOWN Value list using the Values from field option, looked up from the field Students::Name. When I click on this field in the Book_library layout the students names drop down as I want and I can pick any of them. Great so far. Oh yeah, this is all done in LIST view. While on the record I want to click a button script and send an email to just that student. I just can't get it to pick up on the email address from the other table. I hope I've been clear enough to have someone help me.

      Thanks

        • 1. Re: Can't send email from one table using info from another . . .
          philmodjunk
            

          Let's take a closer look at your value list you use in your drop down...

           

          "When I click on this field in the Book_library layout the students names drop down as I want and I can pick any of them."

           

          Are you entering a serial number or a name in this field? (Is this a 2 column value list with the serial number as column 1 and the name as column 2?)

           

          If you are entering a name instead of a number here, you don't have a value being entered in that field that matches a record (by serial number) in the related student table and this is likely your problem.

          • 2. Re: Can't send email from one table using info from another . . .
            chant50
              

            Okay. I don't know what a 2 column value list is, But here's what I've done.

            2 layouts. One called Students, one called Book_Library. The Student layout has all of the normal contact information including the email address. On the Book_Library I have a field called Student_Serial, defined as an indexed number. I have taken that field and assigned it to a Drop Down Value List called Library_Names. When you click on "Manage Value Lists" then "Edit" the Library_Names Values you can see that I used the "use values from" option. Then I selected "specify fields" and "use values from first field" in the Table 'Students' and selected Name. Maybe the problem is that the name field is actually a calculation combining the first and last names, I don't know. But when I click on the field in Browse mode it drops down the names of my students and whichever one I click on stays in the field. I need to then be ble to email that student. I tried using a drop down list comprising of the first and last name fields but although it shows both the first and last name in the drop down list only the first name remains after I click on the one I want.  Hope this helps. I'm lost and I've spent hours trying to do this simple thing.

            Thanks

            • 3. Re: Can't send email from one table using info from another . . .
              philmodjunk
                

              Repeating from my last post:

               

              "If you are entering a name instead of a number here, you don't have a value being entered in that field that matches a record (by serial number) in the related student table and this is likely your problem."

               

              You've defined a relationship based on an ID number to link your two tables, but you aren't entering a number into the field, you are entering a name. Since there's no student record in the table with that name entered in the students::serial_number field, there's no matching data for the database to display.

               

              Make these changes and it should work for you.

               

              Open your value list definition. Select Students::serial_number as the value for your value list. Select the "Also show values from" check box and select the calculation field that concatenates first and last names. Your drop down field will now show a number instead of a name. So you now need to add the Students::FullName field to your layout, to the right of the drop down.

               

              When you pull down the value list, you'll see two columns of data, the student number in column 1 and the student's name in column 2. After you select a student, their related data should now appear also.

              • 4. Re: Can't send email from one table using info from another . . .
                chant50
                  

                PhilModJunk,

                Thanks a lot. Of course it works! Sometimes (more often than not) I need to be hit over the head to understand. Thank you very much for your help. I appreciate it.