Create flag column
Create flag column
![rshun](https://secure.gravatar.com/avatar/b238ea9fe6ac96cfd939d684caffa6c1/?default=https%3A%2F%2Fvanillicon.com%2Fb238ea9fe6ac96cfd939d684caffa6c1_200.png&rating=g&size=120)
I have a column in SQL table for create flag (boolean).
In 'Create new entry', after user press "Create" Button. I want to set it to 1.
How can I do that?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
It would be best to do that on the server with an event - see this manual page here. If you look at the first example, it's setting the creation user for a record - you could do something like this for your boolean.
Colin
Thank you. I can use
editor.PreCreate += (sender, e) => editor.Field("Created").SetValue(true);
to do that.