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

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?

Thx

Andy

0 5 351
5 REPLIES 5

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.

Update:

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.

@Aleksi_Alkio

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

=[MaxRow].[DateTimeCreated]

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.

@Adam_Stone_AppSheet

Iโ€™ll look at that if the problem manifests itself again.

Thx

Top Labels in this Space