Hello again,
In Servoy we can fire methods on all possible situations, but I can’t find the way to o fire a method when the user exits a record. I’m sure I’m missing something here, but I really can’t find it.
Hello again,
In Servoy we can fire methods on all possible situations, but I can’t find the way to o fire a method when the user exits a record. I’m sure I’m missing something here, but I really can’t find it.
what do you mean by on exit? when do you exit a record?
is that the cursor is leaving a field? (that can be triggerd by onDataChange, or onFocusLost, or clicking on the form? (that can be triggerd by onDataSave)
in a form-detail-view you can do this by onHide.
so there are many ways you can describe, when you are exiting a record.
I think you mean the onRecordSelection event
No, i mean wehn the current record is not visible anymore, because I go to another record, or another form or I click on a button to perform an action.
Hi Irenem, hava a look at: onRecordSave()
the method is triggered when a record is being saved. A record is saved when a user clicks out of it (for example on an empty part of the layout or to another form
Hi Enrico,
I have no “onRecordSave” on the form properties, this is my whole problem.
I work in version 3.5.3
Oops,
yes, you’re right… seems missing in 3.5.3, maybe is deprecated and the docs have not yet been updated.
you mean onRecordEditStop ?
Hello Jan,
onEditStop runs the method when you click outside of a field, I want to run the method when I exit the record. Is that possible?
If you click outside a field the record is saved. You can disable this by disabling autosave, but perhaps it’s a good idea if you describe in more detail what exactly you want to do to give you a more efficient answer.
From what I understand he asks for an onRecordDeselection. Just like onRecordSelection is fired whenever a record is selected, onRecordDeselection would be fired, when the record is “left”…
when a user makes changes in a record and he wants to exit it, the system should ask if he the changes has to be saved.
It could be pretty annoying if this happens every time he accidentally exit a field.
what is your definition of exiting a record? When a user leaves the screen? What about if multiple records are being displayed? And what about multi-window situations? And records being displayed in more than one tabpanel?
What we do if we need this functionality is to open that record in a formInDialog with a transaction. Saving commits the transaction, canceling does a rollback. That way you can really control what is going on…
In a form:
when I go to another record, or to another form not displaying the same record
In a list:
when I select another record
In a multiple window situation:
when I close the window or another window is displayed in the foreground
I think Patrick understands it right: onRecordDeselection.
Hello Patrick,
thanks for the tip, I already considered that, but I try to avoid that the user has to deal with to much buttons.
Hi
A lot of developers do not let their users move from record to record in detail/record view. They will force them back to a list view (non-editable) and then select another record from here to go to a detail/record view to edit.
You can then fire methods when moving back to the list view (exiting record view).
Thank you Rodney,
I know that there are other procedures, but I don’t want to force the user to do anything; I just would like to fire a method onRecordDeselction. That’s all.
irenem:
when a user makes changes in a record and he wants to exit it, the system should ask if he the changes has to be saved.It could be pretty annoying if this happens every time he accidentally exit a field.
From an enduser perspective it would make more sense in this case to have explicit save and cancel buttons rather than possible popups asking for this. As popups also refocus on fields they shouldn’t be used too much anyway in conjunction with the event of exiting a field.