Page 1 of 1
Track the logging activity for form when I modify the subform
Posted: Tue Jan 18, 2022 5:10 pm
by gerese
Hi ,
To track the logging activity I use the mytable_nulog column in the database. My form has a subform with 2 text fields, when I add, delete or edit in the subform the logging activity for the form does not change. How can I activate the logging activity for the form when I modify the subform?
Thanks.
Re: Track the login activity for form when I modify the subform
Posted: Wed Jan 19, 2022 5:23 am
by kev1n
Login = logging?
Are you using some code from the forum or your own one?
Re: Track the logging activity for form when I modify the subform
Posted: Wed Jan 19, 2022 10:11 am
by gerese
kev1n wrote: ↑Wed Jan 19, 2022 5:23 am
Login = logging?
.... indeed, I'm sorry for the confusion, I corrected.
kev1n wrote: ↑Wed Jan 19, 2022 5:23 am
Are you using some code from the forum or your own one?
No, nuBuilder
Logging Activity ,
I only use a Display object, to query column_nulog.
I uploaded a test backup.
01-19-2022_103923_nuBuilder_backup.sql.gzip
Thanks
Re: Track the logging activity for form when I modify the subform
Posted: Wed Jan 19, 2022 1:24 pm
by kev1n
It's by design: A main form's _nulog column is not modified if a subform's record has changed. You will have to track that differently (e.g. by some PHP code in the form's AS event)
Re: Track the logging activity for form when I modify the subform
Posted: Wed Jan 19, 2022 2:26 pm
by gerese
Thanks for the clarification.
A quick fix is to create a text object hidden in the edit form.
Code: Select all
if(nuFormType() == 'edit'){
nuHide('object_text');
$('#object_text').val('test').change();
nuHasNotBeenEdited();
}
In this way, pressing the Save button will activate the logging activity function for the form. If you don't press the Save button ... no reaction in logging activity.
I'm posting it here, it might help someone.
Thanks kev1n
