5 Replies Latest reply on May 31, 2017 7:09 PM by scottganderson

    Earliest Date Field for Specific Set of Events


      I'm managing groups of events for a variety of venues.  I have two related tables, one which contains info about the venues themselves and one events table.  Each venue has a unique numeric code. I'm looking for a simple way to store the earliest event date (the date closest to the current date) for a given venue in a field in the venue table, but only for a specific type of event.  I've written a script that triggers every time a new event is created and it gets the job done but it has a few issues, not to mention it seems to be a clunky way to achieve my goal (having to leave the venue layout, enter find mode, perform search, etc...). I tried to create a calculation field called EarliestEventDate and it's straightforward enough to use the MIN function to return the earliest date from the events table, but I can't find a way to restrict the function to look only at dates for a specific venue code AND specific event type.  I was hoping that someone much more experienced than myself could possibly suggest a more elegant solution than executing a script.  Apologies if I'm not being clear, and I'm happy to provide more info if anyone has any helpful suggestions.  Thanks in advance for any help.