5 Replies Latest reply on May 21, 2015 9:40 AM by philmodjunk

    Trying to have "Next Contact Date" field automically updated

    RobertMitchell_1

      Title

      Trying to have "Next Contact Date" field automically updated

      Post

      This is a question regarding FM Pro 12

      I've got the "Date" field automatically updating the "Next Contact Date" field to 2 days later.

      e.g. So if the salesperson enters 05/15/2015 in the "Date" field, the "Next Contact Date" field automatically displays 05/18/2015

      I have another field called "Follow-up Date" and would like this "Follow-up Date" to add 3 mores days of the current Follow-up Date to the "Next Contact Date" 

      e.g. The salesperson enters the date 05/18/2015 in the "Follow-up Date" field and the "Next Contact Date" would automatically change it's field from 05/18/2015 to 05/21/2015.

      Consequently if the salesperson enters 05/20/2015 in the "Follow-up Date" field, the "Next Contact Date" would automatically 05/23/2015

      While I'm sure it can be done, in the fist row, I have many more "Follow-up Date" fields copied below which don't have any means to be edited. 

      How can this be done?  I would appreciate any help. Thank you.

        • 1. Re: Trying to have "Next Contact Date" field automically updated
          philmodjunk

          I don't really follow the logic behind what you want to do. At first it sounds like you have only two fields and editing one to enter a new date should then trigger an update of the other date, but then you briefly mention that you have many more such fields and that leaves the details as to what you want to happen unclear. Can you provide a more detailed example?

          This sentence suggests that you need to rethink your design:

          I have many more "Follow-up Date" fields copied below which don't have any means to be edited. 

          Instead of multiple Follow-up Date fields in the same record, consider setting up a related table of such dates in a portal as this would be a much more flexible way to handle such  a list of dates.

          • 2. Re: Trying to have "Next Contact Date" field automically updated
            RobertMitchell_2

            Thanks for responding PhilModJunk

            At the top of the page I have the initial entry Date automatically tags the Next Contact Date to 2 days later.

            This Next Contact Date needs to be updated after every Follow-up Date that will be entered below

            Salesman enters customer contact info on May 01,2015 ---- Next Contact Date automatically displays May 03,2015

             

            Salesman calls customer on May 3,2015 and enters that date in the first Follow-up Date --- I would like the Next Contact Date (top of page) to now display May 06,2015

             

            I want to keep the follow-up info, so on the next line below, I have another Follow-up Date. The Salesman misses May 06 so he calls the customer on May 08,2015 --- I would like the Next Contact Date (top of page) to display May 11,2015

             

            So each Follow-up Dates below shows how many times the salesperson has tried or contacted the customer

            • 3. Re: Trying to have "Next Contact Date" field automically updated
              philmodjunk

              Those dates at the bottom of the screen should be related records in a portal. Each row would be a different related record. This allows complete flexibility as to how many such follow up contacts need be recorded. If you need, say 200 such follow up contacts (just to use a very large number to make my point), it's no problem as you just keep adding related records in the portal each time a contact needs to be logged.

              Here's how I interpret your description. Let me know if I am in error.

              You create a new record on this screen and enter a Date. The "next contact date" automatically computes and displays a date at top right. When the salesman actually contacts the individual, they log a new contact date at bottom left. At this point a new "next contact date" is computed.

              So far so good.

              Is that new next contact date then to be shown at top right or in another column of the list of contact dates at the bottom of your screen?

              THe next contact date field can be an auto-enter date field with a calculation that computes a next contact date from the original date field with the "do not replace existing value..." check box left selected.

              An OnObjectSave script trigger on the portal contact date field at bottom can perform a script to update the Next Contact date field with a new next contact date each time you enter a new date in the portal at the bottom of the screen.

              Set Field [YourMainTable::NextContact ; PortalTable::FollowUpdate + 2 ]

              • 4. Re: Trying to have "Next Contact Date" field automically updated
                RobertMitchell_2

                Yes, the Next Contact Date (top right) is to be updated each time the salesperson enters a new Follow-up Date bottom screen left.

                 

                As I understand this, the best way is to create a table below (which is called a portal), similar to a spreadsheet? And that each cell in the column (Follow-up Date) would add 2 or 3 days to the Next Contact Date. I would have to make sure that this field (Next Contact Date) can be over riden as we don't want to keep calling the customer every 2 or 3 days.  

                 

                • 5. Re: Trying to have "Next Contact Date" field automically updated
                  philmodjunk

                  The  Layout object is called a portal. you can name the table on which the portal is based any way that makes sense to you. I suggest reading up on portals in Help and any training materials that you might have before attempting this.

                  What I have described is to set up that Next Contact Date as a date field with an auto-entered calculation and a script that can further update it. Such a field can still be edited directly by the user to enter another date--which I understood from your earlier posts was something that you needed to be able to do.

                  To give a data field an auto-enter field option, find the field in Manage | Database | Fields and double click it. (Or single click to select and then click the options button.)