Table View: clicking in not editable fields triggers update

Hi,

Got a form in Table View. All the fields in the table are set to not editable.

Some of the fields are set to “modification username” and “modificationdate” in Servoy.

After creating a couple of records and then clicking a couple of times on the different records, all of a sudden, the “modification username” gets filled (the “modificationdate” stays blank).

In the DB there is a trigger attached to the table, that fires before an insert or update. At the moment when, in Servoy, I see the “modificationname” getting filled, the trigger is fired…

Note: All the fields clicked in are set to not editable!!

Paul

are you saying that a DB trigger does set some values in the row behind the back of servoy? This shouldn’t be done.

Or are you saying that you have a modification auto enters attached in servoy to the columns but you don’t see those filled in when making a new record? That seems to be a bug.

Clicking on everything can be possible (can you select the text??)
If that is possible then the you can access the value but you can’t modify it.

are you saying that a DB trigger does set some values in the row behind the back of servoy? This shouldn’t be done.

Yes, the trigger sets values into the createdby, createddate, updatedate and updatedby columns, IF these fields are inserted empty.

I need these triggers so that these fields get filled when records are inserted through other app/directly into the DB (Yes, i know they will not be seen by Servoy, untill Servoy’s cache is refreshed).

So, in the case where Servoy inserts values into these fields, nothing is done by the trigger.

Or are you saying that you have a modification auto enters attached in servoy to the columns but you don’t see those filled in when making a new record? That seems to be a bug.

No, I’m not saying that either. Servoy perfectly fills the values

What I am saying is the following:

I got a form in tableview. Alls the fields of the table are NOT editable.

Records get created just fine, the auto values createdate and create user name are filled just fine.

Then I start clicking away on the records, that are all NOT editable. all of a sudden, the modification user name field gets filled, allthough I didn’t update the records, since all fields are NOt editable.

When I then refrech the foundset (jumping to design vew and back), I see that the modificationdate and username fields have been filled. From the value they are filled with, I can see that they have been filled by the trigger.

and yes, I have checked if those field are not filled by the trigger on creation.

So, conclusion: clicking in non editable fields (at least in tableview) fires an update statement to the DB (which then offcourse triggers the trigger)

Paul[/quote]

then somehow some value of the record is changed (because if you don’t change something we don’t send an update anyway)

If you click in a non editable field do you see the Edit flag in the status bar?
Maybe you only display the date part of a date. but the first time the date and time part is stored and in the record. Then when you click on it the datefield does gets focus (non editable can get focus so you can select/copy text) And then it commits the data without the time portion. So suddenly something is changed.

Indeed I narrowed it down to clicking only in fields linked to dataprovider of type = datetime (field is a textfield though).

And a textfield linked to a datetime dataprovider does only show the dateportion.

And it happend indeed when you select (part of) the fields content.

The thing is that Servoy shows the autofill values for “modification date” and “modification user name” as defined in Servoy, but the actual update to the database does not contain these values (hence why the values get filled by my trigger).

Can this behavior be changed somehow? Either that the update does not happen at all (preferable :) ) or that if that cannot be changed, that the values are properly filled with Servoy’s auto fill values.

Tnx in advance,

Paul

are you saying that if you make a simple test (without db triggers ect)
of a simple form that has 3 fields (one field you edit and change)
and 2 others fields of Modification Date and Modification username. That the modifications aren’t stored in the db?

sorry, sorry, sorry :oops:

It seems I made a little error in my trigger that overwrote the modifieddate and modification user name when the old value was null.

It does remain a bit strange in my eyes that the not editable field fires an update…

Paul

i fixed it for tableview that we can’t come in edit mode when the field is disabled or non editable. (listview already did work this way)

tnx