1 Reply Latest reply on Jun 2, 2011 1:36 PM by philmodjunk

    Capture Date's in 1 Field

    KAmsinger

      Title

      Capture Date's in 1 Field

      Post

      Hi.

      I have a field that is a drop down calendar. And when I communicate with someone who has a record in my database I put in the date that I sent them an email. If I don't hear back within a certain time period I will email them again and then update the date in the drop down calendar field that I sent the 2nd email.

      What I want is in a separate field to list out each date entered into that calendar drop down field in chronological order. So lets say the field capturing the dates is called "Dates Emailed", in this field it would display the past dates entered into the calendar drop down field, which is a separate field from the Dates Emailed field. So every time I change the date in 1 field it captures the date and lists it like this in another field- "Emailed - 6/1/11, Emailed - 6/2/11, Emailed - 6/5/11, and so on... "

      Any help with this would be awesome. Oh and I am using FMP Adv 10.

      thx

        • 1. Re: Capture Date's in 1 Field
          philmodjunk

          While a simple script could insert dates into a text field, a related table in a portal would work better for this.

          Say your current table is called "Clients".

          Add a table called EmailDates with this relationship:

          Clients::__pk_ClientID = EmailDates::_fk_ClientID

          If you enable "Allow creation of records via this relationship for EmailDates, you can place a portal to EmailDates on your Clients layout and format a date field in the portal with the drop down calendar. To log an email date, just enter this field and select the date.

          A script could also be attached to a button to log today's date as the next EmailedDate record:

          Freeze Window
          Set Variable [$ClientID ; Value: Clients::__pk_ClientID ]
          Go To Layout [EmailDates]
          New Record/Request
          Set Field [EmailDates::_fk_clientID ; $ClientID ]
          Set Field [EmailDates::Date ; get ( CurrentDate ) ]
          Go To Layout [original layout]

          With such a script, you can set the portal to sort Emaildates by date in descending order to put the most recent email date at the top of the portal. You can also set up the EmailDates::Date field to auto enter the creation date and then leave out the second set field step in the above script.