Multiple date fields

I have one table where I enter both a StartDate when I create the record, but then I come back and update later and enter an EndDate.

The problem I am have is that I have 2 different groups, and I want each group to use a different field for the timestamp. FactorySQL just takes the field I set and uses it across all groups.

That is true… that setting is set based on table name and connection. I’d recommend setting up your second group in the following way:

  1. Turn off “Store Timestamp”
  2. Add an action item with the following properties:
    [ul]
    o Mode = SQL Query
    o Expression= “SELECT CURRENT_TIMESTAMP” (without quotes)
    o Data type = Date
    o Write back to column = Selected, set to “EndTime” (without quotes)
    [/ul]

In this way you’re basically rolling your own timestamp functionality, and turning off what the group would use normally.

I’d like to point out one very small thing: This method will query the database for the current time before writing it back. That way you get the time according to the db, which is what you’d end up with using the normal timestamp mechanism. If FSQL and the database are on the same machine, you can make this a tad bit more efficient by changing it to Expression mode, with the expression “CurrentDateTime()” (again, without quotes).

Hope this helps, let us know if there are any problems.

Regards,

Sounds good, I will try that out.