Default Value for a Enum Column

I am facing a problem here, I got a column is set as ENUM, with value: PENDING, APPROVED, REJECTED, initial value as PENDING.

When never I create a new records with form, the default value for that column is working fine, the value will be as “PENDING”.

But after I change the Grouping funtion, GROUP by this column, and with a nested group of other column, the problem is arise.

EG: If I create a new data in the “APPROVED” group, the default value for the column will become APPROVED, rather than PENDING.

But I want the column default value as PENDING, how can I solve this issue?

Now, what i have to is, creating a bot to check is it a new added records with status <> PENDING. If the condition is true, then update the status as PENDING.

Wonder is it an only way?

That’s actually intended behavior: when adding a row from a grouped view, the current active groupings are preserved in the new row. It’s considered a feature.

Your approach is fine, though perhaps a bit inefficient. I would suggest instead just using an action–not a bot–to make the change, and attach the action to the form as the Form Saved event action.

See also:

1 Like

Dear Steve, thanks for the prompt reply, and your suggestion spark an idea for me.

Before I change my bot as an action, may I know why would you suggest using action instead of a bot? Is it better in terms of performance and efficiency?

1 Like

A bot is performed by the server only after the app syncs, whereas an action attached as a Form Saved event action is performed immediately within the app itself. This will give the app user immediate visibility of the change. and reduce the possibility of confusion. That, and I find everything about Automation absurdly complex and difficult; using Form Saved is a great deal simpler.

1 Like

Noted, this really help, thank you very much.

1 Like