More 4.0 - Issue With Total Columns

Ok… another brain bender for you all.

I have a simple setup that worked nicely in 3.5.7.

So, we have a trans and a trans_lines table. Your basic Invoice to Invoice Lines type of setup.

So, in the trans table, I have a Trans_Subtotal calc that is equal to this:

function trans_subtotal()
{
	if (utils.hasRecords(trans_to_trans_lines))
	{
		return trans_to_trans_lines.trans_subtotal;
	}
	else
	{
		return 0;
	}
}

And if I go into trans_lines, the trans_subtotal column has a value but the aggregate of that field doesn’t seem to be working.

So why doesn’t this work in 4.0?

Chico is “So Lost” :(

please make a case for this so that we can look at it.
i cant see from the info i have now why it shouldnt work.

I have submitted a case.

But here’s a clue that I think may be attributing to the issue:

If I look at a invoice that was added prior to my update from 3.5.6, the totals work.

But if I add another line to the invoice… it doesn’t add to the invoice total.

Upon further review… I noticed that the data wasn’t saving to the database. Even if I did a save data, most of the time the record didn’t save to the database… or sometimes the record would get created and show up in the database, but if I modified the record, the modifications weren’t being added.

Thinking it might be that the autosave was not set, I had my solution call it at startup.

The thing is that I’m not getting any errors that pop up letting me know what might be going on.

So… is there some log file that might be giving me some clues? Anyone had this issue?

Chico

what did you call at solution startup for the autosave?
set it on or off?

I had added this:

databaseManager.setAutoSave(true)

Interesting…

I went into the Database Servers in Servoy 4 and when I clicked one of my databases, I got this error in my console:

Could not attach listener to paygo_db
Could not attach listener to paygo_db
Could not attach listener to paygo_db
Could not attach listener to paygo_db
Could not attach listener to paygo_db
Could not attach listener to paygo_db
Could not attach listener to paygo_db
Could not attach listener to paygo_db

I only clicked on Open Server once, and it generated this error.

Also, checked from another computer on our network… get the same result.

Any ideas? All necessary ports are open on both computers.

Chico

those listener warnings are not a problem, they are something that eclipse generates, but they shouldnt bother you any bit.