I have 2 fields in all my tables in my database Inserted By, Modified By. I would like to update these 2 fields based on the DSP user who has logged in and processed the table. Is it possible to do that.
-
Best answer
Hi Mariappan,
DSP has reserved columns names "AddedBy" and "ChangedBy".
By Default, DSP will update the fields "AddedBy" with the user id of the person who added the records (if it was added via DSP and not SQL). It will also update the field "ChangedBy" every time someone changes the record (or if there is an OnValidate Event registered on the page).
If you need the field names "InsertedBy" and "ModifiedBy", you could either use a view of the tables and alias the reserved columns as needed or you could create them on the table as computed columns that are copies of the reserved column names.
1 -
Michelle Boehm
Hi Mariappan,
Did Eric's response help resolve your issue? Let us know if you have any additional questions!
Kind regards,
Michelle0 -
Hi Eric,
Thanks for the response. This is really helpful. I've a doubt in that response.
There are around 200 tables in our project. Is it possible to add these audit fields in bulk. Instead of adding each field in Design/Map for every table separately. Can you please let me know.
0 -
Hi Mariappan,
It is possible to add boa columns (AddedBy, AddedOn, AddedVia, ChangedBy, ChangedOn, ChangedVia, boaStatus) in bulk if you have added the Data Base of the tables as a Data Source in DSP. This will add the above mentioned columns in all the tables present in that data base. Please follow the below steps
1. Go to Admin
2. Click on Data Sources
3. Click on vertical view of the Data source
4. Click on Append Columns
Thanks,
Rafeeque.
1
Please sign in to leave a comment.
Comments
4 comments