Update Touch Date on Parent Table when Child Table Row Added

Hello. I have a support ticket app .

  • The [Ticket] table maintains the list of support tickets.
  • The [Time Entry] table allows for documenting time and notes for each ticket.
  • The column [Time Entry].[Ticket No] references the [Ticket] table key. 
  • The [Ticket] table includes a VC [Related Time Entries] with REF_Rows("Time Entry", "Ticket No")

When a user adds a new record to [Time Entry], I need a date field in the referenced [Ticket] record to update to today. Preferably, this would update the [Ticket] table's Touch Date (and Touches), but it could be another column (e.g. Last Time Entry). We have Dashboards that let supervisors know if a ticket hasn't been touched in x days. However, when a new time entry is saved, the ticket touch date does not change so it appears nothing has happened with the ticket, even though the user added a time entry.

I've tried using actions, but nothing seems to work. I have actions that add a new row to another table when a new record is created, but I seem to get nowhere when trying to update an existing record on a different table. Any insights or direction is greatly appreciated.

Solved Solved
0 3 146
1 ACCEPTED SOLUTION

That setup is what I was going to suggest, or at least the 2 actions. Only change I'd make is your referenced row expression, it can more simply be: LIST([Ticket No]) . But instead of running it in a bot, set it as the form save action for the time entry form.

View solution in original post

3 REPLIES 3

An Update:

I created an action for the Ticket table named Update Ticket touch Date
Table: Ticket
Data: set the values of some columns in this row
Set these columns: Last Time Entry = NOW()
Behavior: Only if this condition is true = true

I then created a bot for the Time Entry table
Event: Data Change (Adds only) for table Time Entry, no condition
Process: Run a data action (custom action)
Data Action: Run action on rows.
   Referenced Table is Ticket.
   Referenced rows expression: FILTER("Ticket" , [Key] = [_THISROW].[Ticket No])
   Referenced Action: Update Ticket Touch Date

The bot doesn't error out, but it doesn't appear to run the action.

That setup is what I was going to suggest, or at least the 2 actions. Only change I'd make is your referenced row expression, it can more simply be: LIST([Ticket No]) . But instead of running it in a bot, set it as the form save action for the time entry form.

Marc, your expression was the key! Thanks. I changed my expression to yours and the bot worked perfectly. No other changes required. Thanks!!!!

Top Labels in this Space