1 2 3 Previous Next 104 Replies Latest reply on Nov 8, 2012 2:10 PM by philmodjunk

    Task List Creation Issue - HELP!

    hwminc

      Title

      Task List Creation Issue - HELP!

      Post

           Wondering if someone can help me out. I have three tables - Tasks, Tasks 2 and Tasks 3, each one is linked to a different table for a specific type of contact. What I'm trying to do is show only the tasks for that type of contact from the specified table in a specific layout for the specific type of contact. The problem is that when a 'Prospect' task is created, it shows up in the Prospect Task Layout just fine, but when I add a Task for a Media Contact, that one shows up (all the address and phone fields are blank) as well in the Prospect Task layout. I want to have the different types of contact tasks show up only in their respective Task layouts, but they are all showing up in every one. Anyone know how to rectify this? I thought perhaps it was a sort issue at first, but soon realized that wasn't it. Thanks in advance!!

        • 1. Re: Task List Creation Issue - HELP!
          philmodjunk

               It sounds like you do not have three tables, but one table with three table occurrences. If I am right, when you go to Manage | Database | Fields, there'll only be one choice for Tasks the the tables drop down on this panel of the Manage | Database dialog.

               That's probably as it should be.

               But to have separate layouts for each type of task will require additional scripting to filter out the other task types.

               Either that you you should use filtered portals that filter out all but one type of task for listing your tasks instead of separate layouts.

               Here's a script that will filter a found set down to just "prospect" task types:

               Enter Find mode [] ---> clear the pause check box
               Set Field [Tasks::TaskType ; "Prospect"]
               Set Error capture [on]
               Constrain Found Set []

               You can set the ONModeChange script trigger in layout setup for this layout to perform this script everytime browse mode is entered or every time find mode is exited and users can perform finds on the layout for tasks, but the system automatically filters the results down to just the specified task type.

          • 2. Re: Task List Creation Issue - HELP!
            hwminc

                 Yup, I was on that track of one table with three occurrences...would it be better to simply go back and create three separate table occurences for each type of contact task? Its probably a bit more clunky admittedly, but since I'm the only one using the db, keeping these tasks separated is ultimately the goal...

            • 3. Re: Task List Creation Issue - HELP!
              philmodjunk

                   It won't solve the problem that you have here, that a layout based on any one of the three task occurrences can access all the records of all three task types.

                   The table occurrence you select controls how or if data from other tables can be accessed from the current record on your layout. It has no effect one what records can be accessed from the layout's underlying data source table.

              • 4. Re: Task List Creation Issue - HELP!
                hwminc

                     Well, i'm confused. Maybe the relationship diagram will help me explain. I'm not understanding how the filter script is supposed to be written...thought it might be clearer to me if you see the diagram

                • 5. Re: Task List Creation Issue - HELP!
                  philmodjunk

                       Use the filter script exactly as written, but with your field and table occurrence names in place of mine.

                       You have many occurrences of Tasks there and I don't know which are the 3 for which you set up separate layouts.

                       Enter Find mode [] ---> clear the pause check box
                       Set Field [Tasks::TaskType ; "Prospect"]
                       Set Error capture [on]
                       Constrain Found Set []

                       In place of Tasks, use the occurrence name associated with your layout. That will be the name found in "Show Records From" in Layout Setup...

                       In place of TaskType , use the field that stores the value that identifies the type of task. From your last screen shot, that appears to be the Task_Type field.

                       If Task_Type is not a text field storing the actual text "Prospect" for tasks of Type prospect, use the value that IS entered in that field to identify the type of task.

                  • 6. Re: Task List Creation Issue - HELP!
                    hwminc

                         The 'Task Type' field doesn't designate whether it is a Prospect or Media contact, just designates Phone Call, Email or Letter. The way the db is set up is that the contact tables are each different - so there is one for Prospects, one for Media and one for Clients.  I thought if I used the ProspectIdFk field as the 'this is a Prospect contact' designator in your Set Field script step it would work, but it doesn't appear to be doing the trick...not sure what I'm doing wrong, but here is the script as I wrote it... 

                    • 7. Re: Task List Creation Issue - HELP!
                      hwminc

                           Dear PhilModJunk,

                            

                           I think I may have figured out how to do this. When I am in the Task list for 'Prospects' the only field that shows up if it is either a Prospect or Media Contact is the 'Task_Description' field. I am wondering if I were to go back to the Table_Tasks and create a Task Description field that corresponds to each of the three different types of contacts - ie - Task_Description_Prospect, Task_Description_Media, Task_Description_Client if that would allow for the filter to work as you indicated?

                      • 8. Re: Task List Creation Issue - HELP!
                        philmodjunk

                             I would not use separate data source tables for each type of contact.

                             If you had one table for contacts, then you could have a contact type field that identifies the type of contact and then the set field step can specify criteria for that related table from the contacts table:

                             Enter Find mode [] ---> clear the pause check box
                             Set Field [Contacts::ContactType ; "Prospect"]
                             Set Error capture [on]
                             Constrain Found Set []

                        • 9. Re: Task List Creation Issue - HELP!
                          hwminc

                               Thats what I was thinking. The only issue is that for example, with Media Contacts, these are linked to Clients and Media Activities, whereas Prospects are essentially connected to neither MC's or Clients. That was the original idea behind keeping all three separate. If I have only one table for Contacts, there doesn't seem to be a way to get a Media Contact linked to a Media Activity as well as a link to a Client...

                                

                          • 10. Re: Task List Creation Issue - HELP!
                            philmodjunk

                                 I don't see why that would be a problem, but I'm not sure if you are describing data source tables or table occurrences when you use the term "table". Table occurrences are the "boxes" found in manage | Database | relationships. Data source tables are what are listed down the left hand side in Manage | Database | Tables. Any given table occurrence refers to a specific data source table that you can inspect by hovering the mouse over the arrow in the upper left corner of the occurrence box. You can create any number of table occurrences that all refer to the same data source table.

                                 What I originally said was: You should only have one data source table for contacts. You could easily have multiple table occurrences of contacts in order to manage different relationships.

                            • 11. Re: Task List Creation Issue - HELP!
                              hwminc

                                   Okay, so I just make one table for contacts and then have a checkbox set that designates whether the contact is a Client, Media Contact or Prospect...and have a ProspectIdFk, MediaContactIdFk and ClientIdFk to link them to the Notes table, the Media Activities Table and the Tasks table or occurences thereof? 

                                   Right now I have a layout for Media Activity that is populated with a dropdown that allows me to select the Client and the Media Contact for a particular Media Activity...wondering if it would be helpful for you for me to send you a copy of the DB so you can see what I mean?

                              • 12. Re: Task List Creation Issue - HELP!
                                philmodjunk

                                     You might want radio buttons unless a contact can be more than one of these. A check box enables the user to select multiple values.

                                     You should only need one primary key: __pkContactID and each of your related tables should need only one foreign key: _fkContactID.

                                     And conditional value lists can be set up if you need different values to appear in that list for different types of contacts.

                                • 13. Re: Task List Creation Issue - HELP!
                                  hwminc

                                       So it should look like this?

                                  • 14. Re: Task List Creation Issue - HELP!
                                    philmodjunk

                                         That's how I'd do it. For contacts that don't need related MediaActivity records because they aren't that type, you just don't create any related records for that contact.

                                    1 2 3 Previous Next