# Combining server-generated values with changsets

**URL:** <https://forum.elixirforum.com/t/combining-server-generated-values-with-changsets/55764>\
**Category:** Questions\
**Tags:** ecto\
**Created:** [May 8, 2023, 11:07pm UTC](https://forum.elixirforum.com/t/combining-server-generated-values-with-changsets/55764 "2023-05-08T23:07:55Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![binarypaladin](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/binarypaladin/32/31708_2.png) [@binarypaladin](https://forum.elixirforum.com/u/binarypaladin)\
**Post date:** [May 9, 2023, 4:24pm UTC](https://forum.elixirforum.com/t/combining-server-generated-values-with-changsets/55764/7 "2023-05-09T16:24:57Z")

</div>

You’re focusing too much on a contrived example. Here’s another one (also contrived). I want to be able to do something like this:

```elixir
%ExampleSchema{id: 1, name: "Jane Smith", changed_name_at: nil}
|> change(name: "Jane J Smith")
|> put_sql_change(:changed_name_at, sql_fragment("NOW()"))
|> Repo.update(returning: [:changed_name_at])

```

If I wanted the date generated by the server, not the application, is there a way to do this either in a changeset or as an option in `update` (and similarly, with `insert`)?

---

_[View the full topic](https://forum.elixirforum.com/t/combining-server-generated-values-with-changsets/55764)._
