Custom field with dynamic default value

Generally: I’m looking for solution where I need to setup new field as a list type where default value would be taken from specified field in the second table. The relation which value(raw) to use would be defined by value in the other field of first table.

In people table will be custom field sg_default_work_type defining artist’s default type of work, then in the Time Logs table will be custom field sg_work_type. Now whenever artist logs his time it would look to people table and pick the value of artist’s default type of work. This type of work should be editable later if desired. This is simplified user case. Is this doable in SG?

Thank you

You can achieve different default values in a different less dynamic way… not what you are looking for but might be useful.

If you want to pre-populate any field when creating an entity, if the page you are creating this entity from has filters applied, those filters will then inform the creation UI to have those filters listed as values.

Eg. If you have a Page Filter for Time Logs that includes a filter for sg_work_type == some_value, then any new Time Log from this page would include that value by default.

The caveat however is that this value can’t be set by the Current User sg_default_work_type, because you can only refer to “Current User” on a filter for an entity field that links to a Human User, which would rule out this list field. If we could include queries for filter values … then yeah this would be possible, and I could see it being very useful (but more server overhead per page call).

thank you for tip @Halil, we can’t use this “hack” as the artists could potentionally record their hours through the SG Create.