Howdy, I'm trying to create a workflow rule ...

(Elan Bailey) #1


I’m trying to create a workflow rule to change data in table A based on an add/update in table B

I have set up:

  1. An action to update Life Map (table A) Activity column (datetime type) with the current date and time (NOW()) whenever a reflection is added/updated in the Reflections Table (Table B)

  2. An action to get the list of Life Map records to update (from Table A) based on the Domain ID of the current row in the reflections table (Table B)

  3. A workflow rule so that changes (add/updates) in Table B trigger the workflow.

I’m a little confused by how to use the built in test suite for this. But I’ve tried to test it by adding and updating records in Table B, but the date time stamp doesn’t appear in Table A when I do.

Can anyone provide any helpful pointers?

(Elan Bailey) #2

Anyone? I’ve followed this article here but I’m obviously missing something in translation. - Changing Data from a Workflow Rule Changing Data from a Workflow Rule

(Tony Fader) #3

Hi @elan_Bailey. I think you might be able to do this in a simpler way without using actions.

Make a change timestamp column in Table B so that each row records its last update. (Example app here:

Then, in Table A, make a virtual column that finds the latest date of the related rows:

MAX(SELECT([Related Table B Rows Column][Change Timestamp Column], true))

Then you don’t have to use actions to keep the timestamps updated. Let me know if that works for you. Change Columns - Keep track of when columns change

(Elan Bailey) #4

Thanks @tony I’ll give that a try

(Elan Bailey) #5

@tonyThis worked brilliantly. Thank you so much. T-3 days to launch!!!

(Tony Fader) #6

@elan_Bailey Good luck!

(Brian Russell) #7

Elan Congrats on getting that to work. I am trying to do something like this myself. If it is not to much trouble can you post what you actually used in your MAX statement. I am not familiar with the format and would be easier to see it using the actually code. If you cant I understand. Thanks - Brian

(Elan Bailey) #8

@Brian_Russell1 Thanks. Here’s the code I used =MAX(SELECT(Active Intentions[Last Updated], [_THISROW].[Domain ID] = [Life Domain]))

I created the virtual column in Table A. And added the expression there.

The Select function is looking at the Last Updated column in Table B (active intentions - it’s actually a slice).

It’s then looking at all rows where Life Domain matches the Domain ID of the row in table A and bringing back the latest (max) time stamp.

Oh and in this case because I’m working with a date/time stamp I had to set the virtual column type to DateTime. When I first created the virtual column the system defaulted to ChangeTimestamp, but this kept throwing an error.

Hope that helps.

(Brian Russell) #9

Great thanks. This helps. I will give it a go today.