3 Replies Latest reply on Jan 4, 2013 12:27 PM by philmodjunk

    Multiple values in 1 field



      Multiple values in 1 field


           I have a system where users email contacts via a script that pops up the email dialog.  I use a Set Field function to create a Timestamp whenever the email button is clicked. For example: user clicks the email button and emails John Doe; A field designated to catch the timestamp via Get (currentdate) is populated.  Is there any way to add multiple values in this 1 field so that each time a user emails the contact, a timestamp is captured? thanks

        • 1. Re: Multiple values in 1 field

               It is possible, but this sounds like a case where adding a new record in a related table where you have a date field would work much nicer.

               Set Field [YourTable::EmailDateList ; List ( Get ( CurrentDate ) ; YourTable::EmailDateList ) ]

               will build a list of dates with the most recently added date at the top of the list. You can reverse the two parameters used in the List function to put the post recently added value at the end of the list.

          • 2. Re: Multiple values in 1 field

                 Thanks Phil.  I'm trying to visualize this.  Is it customary to create a table just for one date field?  The current table I am working on is very small and doesn't have a relationship I can use for this.

            • 3. Re: Multiple values in 1 field

                   You can always add a primary key field--using either an auto entered serial number or an auto entered Get ( UUID ) (fileMaker 12 only) for such a relationship, though the email address field itself should also serve.

                   It may seem odd to you to set up a related table with just two fields in each record, but consider the options this gives you that a mulitple value field of dates does not:

                   You can search and sort by date on these fields.

                   How many emails did we send out on 12/31/2012?

                   How many for the Month of January? First quarter 2013 or ... ?

                   All things difficult to impossible to do with your text field filled with multiple dates.