Hi All,
Before I ask my question, I want to congratulate the team Servoy
for the efforts they are making.
I’m trying to use the added method “databaseManager.addTrackingInfo()” but it doesn’t work for me,
I call it before savedata ()? after savedata ()? but it’s not working!
I think i’m using it wrong, that’s why I hope to ask some questions.
When do I need to call the method?
when we add several records in the log table after saving ,is the value of the new column will be added to all these records?
Every time a tracking record is inserted in the log table, the specified value (‘trackingInfo’)is also inserted in the specified column (log_column_name).
This is added to tag data changes with some meaningful data for your app.
You only need to call this method once in your solution and all tracking info for that client from then on will be tagged as such.
You can call it more often to update the value if you need to, call it with value null if the tracking should no longer be tagged.
I tested what do you suggest but unfortunately it doesn’t work
Here’s what i’m doing
I have a database server DB_x which is in the same time my server log
I added in the table log a column with the name “id_member” and type int
I have a solution with a form Frm_x based on a table TB_X witch Tracking is enabled for it
I’m logging with a user who’s member of Tracking group.
I called the method (databaseManager.addTrackingInfo(‘id_member’,2) for example) in onsolutionOpen, it doesn’t
add this information in my inserted log after saving.
I called the method (databaseManager.addTrackingInfo(‘id_member’,2) for example) in Onload of my form Frm_x, it doesn’t
add this information in my inserted log after saving.
I called the method (databaseManager.addTrackingInfo(‘id_member’,2) for example) in OnShow of my form Frm_x, it doesn’t
add this information in my inserted log after saving.
What am i doing wrong.
You only need to call this method once in your solution
I need to call the method each time i have to do save because i want to log a specific value related to the inserted log
and not a static value.
I believe the signature for addTrackingInfo() is (String, String), so I suppose it doesn’t work in your case because you use and int column and integer value.
You should try it with a VARCHAR(XX) and a String value.
rgansevles:
You only need to call this method once in your solution and all tracking info for that client from then on will be tagged as such.
You can call it more often to update the value if you need to, call it with value null if the tracking should no longer be tagged.
Rob
Hi Rob,
This was news - that I need to call .addTrackingInfo() each time my value changes.
I would like to record a global variable value with each record in my log table.
So far it’s ok, there is only one place where this variable changes and I can add a call to .addTrackingInfo() right there, but it would be nice to not have to do that.
Is it something Servoy could implement - grabbing the current value of whatever variable is passed to .addTrackingInfo(), rather than a static thing?