I'm trying to update a Date column on Table 1 based on new rows or changes to existing rows in table2. I currently have a formula in the Table 1 column, but this requires the row to be saved in order for the update to happen: SUM(SELECT(Table 2[Buyers Contacted],[Date]=Date([_THISROW].[Date]))). I would like for the update to take place without requiring the user to save the Table 1 record. I suspect that this will require some type of automation, but I am new to using the automation approach. Can anyone point me in the right direction or provide an example?
If I understand correctly, you wish update a Date column in Table after Adds and Edits to rows in Table 2.
To do this, you would add a set of actions to the Form saved behavior on the Table 2 Form view. The top action would be of type "execute an action on a set of rows" which allows you to select which Table 1 rows to get updated AND select the action that performs those updates.
The key to make this work is using the INPUT() function. This function will allow passing of values between the actions. It will seem a little complicated, but it is rather easy to use.
As you explore this construct, please don't hesitate to ask additional questions.
I hope this helps!
Thank you. I'm a bit of a newbie to Appsheet...can you explain in greater detail what you mean by "a set of actions"? I started to add an action on the "source" table but got stuck on the formula for "referenced rows". I see where you can reference another action, which I assume is the 2nd one, but those just look like the standard ones (edit, add, etc.). Is there an example of this I can use?
I think I have this almost working...I just need to understand how the INPUT() function fits into the solution. Right now I have the 2 actions in place but it is not working. Does it go in the 2nd action under Advanced?
Are you wanting the date to change for any item change on a row? This will be a TimeStamp and then check all the rows you are looking at to change based on that. This will update automatically based on changes. and will let you know when a change was made. you can even make a edit count and a user who made the edits if you are really trying to track this data that far.
I'm familiar with TimeStamps, but in this case I'm trying to update a "last visited" date on a place of business whenever a log is created that references that place of business. So the action would trigger whenever a log is created or modified. I think the solution above is headed in the right direction, I just need more detail to implement it. Thanks!
You could use that action in a select statement and add it to the form save. In the form for the row that references that place.
It would be a run an action on a set of rows. The statement would be SELECT(Places[Key], [Key] =[_THISROW].[Places Key Ref Column]). Then choose the action to make the [DateColumn] = TODAY(). Make another action that is go to view in app. and LINKTOFILTEREDVIEW("DetailViewForRowBeingEdited", [Key] = [_THISROW].[Key]). Then combine them in a grouped action. Make the row change action first, then return to detail view to prevent issues. Make this action the event action on save.
User | Count |
---|---|
18 | |
9 | |
8 | |
5 | |
5 |