Create flag column

Create flag column

rshunrshun Posts: 44Questions: 9Answers: 0
edited January 2021 in Free community support

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

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    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

  • rshunrshun Posts: 44Questions: 9Answers: 0

    Thank you. I can use
    editor.PreCreate += (sender, e) => editor.Field("Created").SetValue(true);

    to do that.

This discussion has been closed.