Skip to main content
Known Participant
Jun 12, 2023 2:18 PM UTC
Question

how to add meta data everytime in the table

Hi, my table is having let's say fields - name, age, gender and  meta Data - isActive, createdOn, createdBy. How to add data for these fields

3 replies

sanchitg0002
Inspiring
Jun 12, 2023 2:30 PM UTC

You can create a formatting/casting rule for the CDT and use it before writing the data into DB. This rule will add default values for metaData fields i.e., true, now(), loggedInUser().

stefanhelzle0001
Brainy
Jun 12, 2023 3:13 PM UTC

I typically create an expression to setup the basic data structure and use it either before or after user data input.

harshitb6843
Brainy
Jun 12, 2023 5:23 PM UTC

I would recommend always isolating the Write to DSE model in a separate process and using it as a subprocess, exactly for this reason. If you have this, then you can just a script task before your smart service and use it to set the meta data.