11
"Save Current Date/Time If NULL" and "Save Current User ID If NULL"
Source: directus/directus#23726 · opened by @tinhXEM
Summary Change the “On Create” setting of the field from “Save Current Date/Time” to “Save Current Date/Time If Null” and from “Save Current User ID” to “Save Current User ID If Null”. Basic Example _No response_ Motivation In some cases, I need to set the values for date_created or user_created when inserting a new row into the database. Currently, I have two options: 1. Insert the row and then manually update the values afterward (which is time-consuming). 2. Set “On Create” to “Do Nothing” and create a flow (action) to update the values if they are null (which adds unnecessary complexity and inflates the follower count due to a simple function). Detailed Design The "On Create" setting will be enhanced to include a third option, "Save If Null," for both the Date/Time and User ID fields. This new option will ensure that if no value is provided for these fields, the system will automatically save the current date/time or user ID. However, if a value is pro…
No pledges yet. Be the first to back this.
Comments
Similar requests
filters for checkbox or multiple dropdown
10 votes · 0 comments
Save selected preview resolution
2 votes · 0 comments
Checkbox: Open preview URL in new window
1 vote · 0 comments
Implement 'Save All' Functionality for Nested Collections in Relation Drawer
3 votes · 0 comments
`_empty` and `_nempty` filter in Joi Schema don't align with filters used for database querying
1 vote · 0 comments
No comments yet.