How default values work?

Hey. Maybe I’m missing something, but default values in my entities don’t work. I have a database with tasks, and I want the priority to default to “medium” and the type to default to “task,” but it doesn’t work. I reread the knowledge base and couldn’t find an answer there.

Looks like a bug, we will check

It appeared these fields are selected as Required, and in this case we prioritize specifically ask a user to fill such values. If you want to have them filled automatically, you may remove Required option.

Hey, Michael. Thanks for the reply.
Is it intentional behavior? Because the connection between a field being required and having a default value is not really obvious. We made them required because it would be strange to see a task without a priority or a task type at all, but at the same time most of our tasks have the type Task and the priority Medium, and having to choose the same values every time is not very convenient either. I thought about a workaround in the form of Validation rules, but they only work for Update, not for entity creation. The only possible option I see is to make the fields optional and set up Automation that would notify me when someone creates a task without specifying type and priority (but this is also not ideal, since a user may create a task without them and only add values to those fields later, at a time when I have already received a violation notification :woozy_face:)

It’s not ideal because you’d need to set up a separate automation for each field. But why not just set the fields as optional and an automation that upon creation checks if those fields are empty and if so, updates the entity to the default fields?

1 Like

I also find this feature confusing. It would be great to be able to have a default value for fields when an entity is created.

I’ve tried to make them non required but default values still don’t work :melting_face:

Default value applied on save, so it is expected behavior

Wouldn’t we want the user to see what default values were being applied before the record is saved? I would be confused as a user if I left a field blank, saved the record, and then saw that a value was added. Seems like that would lead to confusion, if not tech support calls.

2 Likes

I definitely agree that it would be good to set values on UI right away. As I remember it was not very easy to add, but I will check

1 Like

What I see as confusing is: why ask to provide a Value when empty, when you can not go further without filling it up, and still need to fill it up? Maybe it does fillout automaticly when it goes through an automation? If it’s only to fill the ones that are already empty in the entities that were created in the past…not sure if that’s what you want in all cases… let’s say, you forgot in the past to fill it out, but that doesn’t mean the Entities need that default Value.