Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Track the logging activity for form when I modify the subform

Questions related to using nuBuilder Forte.
Post Reply
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Track the logging activity for form when I modify the subform

Unread post 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.
Last edited by gerese on Wed Jan 19, 2022 1:45 pm, edited 2 times in total.
nuBuilderForte .... BIG Like !!!
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Track the login activity for form when I modify the subform

Unread post by kev1n »

Login = logging?
Are you using some code from the forum or your own one?
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Re: Track the logging activity for form when I modify the subform

Unread post 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
You do not have the required permissions to view the files attached to this post.
nuBuilderForte .... BIG Like !!!
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Track the logging activity for form when I modify the subform

Unread post 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)
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Re: Track the logging activity for form when I modify the subform

Unread post 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 :thumb:
nuBuilderForte .... BIG Like !!!
Post Reply