Hi There I have an app (HS Training Log) tha...

(Andrew Eills) #1

Hi There

I have an app (HS Training Log) that uses CopyRow to provide recurring course scheduling.

When a course is marked as completed, the logic compares the MaxRow date/time data stored in a virtual column against the new DateTime stamp of the copied row, in order to determine whether it needs to create (copy) a new row (ie, schedule the same course for the same employee for three years hence).

When I used the app this morning, the CopyRow logic wasn’t working.

I have the same logic in another app (FM Tasks) and that is working fine.

After much checking, I finally looked at an older version of the app, and the logic worked perfectly.

When I restored to that version, the logic didn’t work.

I did this for a number of versions, and the exact same thing happened (worked before Restore, but not after).

I think it may have something to do with the ‘Automatic consistency check’ that Appsheet conducts after a Restore, and guess there may be something wrong in the app somewhere, but the fact that the version works before restoring it may mean something to someone with more expertise than myself.

Before I invest any more time in trying to solve this, does anyone have any pointers or info on this problem?



(Aleksi Alkio) #2

May I ask what is the formula behind of this?


When consistency checks make automatic changes, usually this is reported once on the Info page. Right after restoring the version, if you check this info page it may tell you what changed.

(Andrew Eills) #4


I started the app this morning and everything is working fine, whereas when I left it last night, it wasn’t.

This is an older version of the app that I restored, yesterday.

I’ve tested the latest version, which works too, so I’ll restore to that to see whether it survives the consistency check.

(Andrew Eills) #5


Hi Aleksi - You might wish you hadn’t asked!

The functionality is to update a row that holds a course scheduled for an employee.

If the update doesn’t close out the row as ‘course completed’ the row should just update with the new information.

If the update marks the course as ‘complete’, a new row is created that schedules a refresher of the course for the employee at a point in the future based on the refresh interval for that course.

I’m using a Ref VC called MaxRow with

=MAXROW(ScheduleMgt, DateTimeCreated, [CourseSeriesID]=[_Thisrow].[CourseSeriesID])

to get the last instance of the course series ID (ie, of the series Course A for Employee A), and then a DateTime VC called FetchMaxRow with


to hold the DateTimeCreated Key.

I have a list of Actions that run on form save.

The last is a Copy Row with the condition

AND([DateTimeCreated] = [FetchMaxRow], [Completed] = TRUE)

which will create a new row, effectively scheduling the next instance of this particular course for this employee, if the row being saved is the latest instance of the course and it has been marked as complete.

The first Action (ResetFlagTrue) in the list uses

[DateTimeCreated] > [FetchMaxRow]

to set a column called ResetFlag to TRUE if the row is being created as a result of meeting the Copy Row condition.

If so, a few other Actions, dependent on ResetFlag being TRUE, reset the values of various columns in the newly copied row.

On Friday, I added some logic to only kick off this sequence of actions if the employee is still active (employed by the company) that involved some virtual columns picking up the employment status of the relevant employee from the Employees table, and using that as a condition to proceed with the Actions.

I thought this might be messing with the overall Copy Row logic, but now I don’t think so, as everything is working.

It would be good though, to understand what was happening to stop the ResetFlagTrue action working.

(Andrew Eills) #6


I’ll look at that if the problem manifests itself again.