How to use the last inserted value as a default for the next row that will be inserted

Insert the following code into the after_insert action.

Example 5.6. default values

hk_this.set_defaultvalue(hk_this.value())