The parameter should be id and not example_nulog. Kev1n could you help me to solve that. Sound really nice but I don't find how to implement it. ThxAdd a Button Object to your form with the Label ? and an onclick handler. JavaScript: showNuLogInfo('example_nulog');
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Use of nulog
-
- Posts: 315
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 87 times
- Been thanked: 11 times
Use of nulog
I use this nice solution for viewing the nulog. I am trying to implement it https://github.com/nuBuilder/nuBuilder- ... y#-example. I don't know how to create the button like described. How can I do that ?
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Use of nulog
Hi,
1. On your form, click "Add Object" in the Options Menu (CTRL+SHIFT+H)
2. As a label, enter e.g. ?
3. Type in any object Id.
4. Switch to the Custom Code Tab
5. Event: onclick
6. JS code.
7. In the Input tab, chosse button.
1. On your form, click "Add Object" in the Options Menu (CTRL+SHIFT+H)
2. As a label, enter e.g. ?
3. Type in any object Id.
4. Switch to the Custom Code Tab
5. Event: onclick
6. JS code.
7. In the Input tab, chosse button.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 315
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 87 times
- Been thanked: 11 times
Re: Use of nulog
thanks Kev1n very helpfull. Where should I put the related code :
I have put it in the custom code at the form level and nothing happens.
Code: Select all
function showNuLogInfo(id) {
var nuLog = $('#' + id).val();
var obj = JSON.parse(nuLog);
var msg = getNuLogData(obj.added, 'Added', 'User') + getNuLogData(obj.added, 'Added', 'Time');
msg += getNuLogData(obj.viewed, 'Viewed', 'User') + getNuLogData(obj.viewed, 'Viewed', 'Time');
msg += getNuLogData(obj.edited, 'Edited', 'User') + getNuLogData(obj.edited, 'Edited', 'Time');
nuMessage([msg]);
$('#nuMessageDiv').css('text-align', 'left');
}
-
- Posts: 315
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 87 times
- Been thanked: 11 times
Re: Use of nulog
I have put all the scripts at the same place.
And created the button as explained.
Nothing happens. It seems that the message box isn't attached to the button. What is wrong ? Many thanks, YvesYou do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Use of nulog
Add the function showNuLogInfo() also under Custom Code. Also make sure there's a nulog object on your form as described in the article.
I tested the code on the test platform and it worked right away.
You can inspect the objects, code there if that helps.
I tested the code on the test platform and it worked right away.
You can inspect the objects, code there if that helps.
-
- Posts: 315
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 87 times
- Been thanked: 11 times
Re: Use of nulog
I did the same think behind edit button instead of browse and edit button with the same result 

-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
-
- Posts: 315
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 87 times
- Been thanked: 11 times
Re: Use of nulog
Found my mistake. I haven't created the object mapped to the nulog field. Thanks Kev1n for having put the solution online which has helped me to find the solution. Great thanks.