How do I get a program to stop?

I have had this problem off and on for 2 weeks.

When I open up my application, it immediately starts. See the first screen for the notation I get at the bottom. This could run indefinitely. I have had it run for 600 seconds .

The second screen shows "SaveChangesInvoices" which is running from a legacy table.

This used to run perfectly and for some unknown reason I have run into this very difficult glitch.

Mike
PrintScreen01

Please check advanced tab of your query.


If you checked the "run this query on page load?", uncheck it.

Elite:

I don't even have that option for table2. See screen shot below.

I have 2 tables on my screen and for table1, I do have that option.

I would like to add some more information. When I click on the code {{table2.recordUpdates}}, I get a message that the table is not defined. This is shown in the second screen shot.

Mike

This is becoming a very serious problem.

I have 2 programs that start running as soon as I start up my application.

I know for some reason if the 2 programs start up and there is no change in the screen table, then they will run indefinitely and now I have no way of stopping them.

The application still functions. When I run something, for a few seconds there will be 5 applications running, then it goes back to 2 applications running.

I have carefully checked my primary keys, they are correct and they are all on autoincrement.

I am using Legacy Tables.

The Advanced Tab has no check marks for automatic starts.

I am showing some screens below to show what I am dealing with.

I need a fix whereby when there are no changes that the program will realize that then stop.

Mike

PrintScreen01

SaveChangesInvoices
PrintScreen02

SaveChangesInvoices2
PrintScreen03

I wanted to report that I have solved this problem.

Normally I have my grids set to automatically update to the server when the data changes. I had this grid set like that.

And for some reason it would churn away for ever updating to the server even though it had less than 15 records.

I simply changed it to update manually and now it works fine.

I thought I should report that this case can be closed.

I have attached a screen shot.

Mike

I have found one more thing that totally solves this problem.

If anyone is interested, you can let me know.

Mike

Its started again. I was so happy when I fixed this by changing the property to
Run query when manually triggered.

But now it is starting to run endlessly again.

At one time there was an issue with "Table Not Defined" but I have shown in the screen shot that the table is clearly defined.

There are 8 records in this table. It should not be taking an infinite time to transfer these records to the server.

Mike

Hi @mdsmith1, this is odd. Are you still having this issue? It may have been a UI bug, hopefully refreshing the page fixed it but let us know if this is not the case.

Paulo:

I don't know if I will ever completely solve this issue.

The problem is with saving to the server when there are no changes in the tabe data with
{{table2.recordUpdates}} *SaveChangesInvoices".

I have pretty well solved it by making changes in an unused field before applying the above code.

In my environment, if I don't make changes in the screen table, the code runs forever.

Mike
PrintScreen02

If I'm understanding correctly, the issue is running the SaveChangesInvoices query when there are no changes on the table. If that is the case, you can wrap that line with an if statement. For example:

if (table2.changesetArray.length > 0){
    await SaveChangesInvoices.trigger()
}

I am getting an error message as below.

Mike

Hi Mike, not there. On the "AwaitRefreshInv..." query you shared, where all the await statements are:

PrintScreen02

If line 2 is causing that issue, the if statement is to only run that line if there are changes on the table. Change line 2 for :
if (table2.changesetArray.length > 0){ await SaveChangesInvoices.trigger() }