Default date value based on a connected record's date field

I want to set the default value for a date field on a child record to the value of a date field on that record’s parent. Here is the actual scenario:

I have a projects table that contains a ‘Planned Finish Date’ date field. I have a connected project updates table containing a ‘New Finish Date’ field. When a user makes a project update they can choose to provide an new project finish date by entering the new date in the ‘New Finish Date’ field.

What I want is for the default value of the ‘New Finish Date’ field to be the current value contained in the connected project record’s ‘Planned Finish Date’ field. If the user wants to change the date they can do so, and when the record is saved it updates the connected project.

Sadly, I can’t figure out how to set the default value of a date field based on a field in a connected record.

I gave up on this and tried a workaround by adding an equation field on the project update table that would capture the value of the project’s Planned Finish Date field. Unfortunately the resulting value is Unix time. (Actually 12-31-1969) It is as if the Planned Finish field is empty, but it isn’t.

I am obviously missing some pretty crucial things about how date fields, equation fields and Knack time in general works. Help!

You need to use record rules here I think.

On the form, create a record rule that if new finish date field is blank set it to connected record planned finish date.

Your challenge will be displaying the current project end date to the user while creating the project tasks - as these cannot be pulled through to a create form. I would put a details view of the project at the top of the page with the basic project details, then the Add form, so the info is on the page, something like this:

and use a record rule to set the task date if left blank:

1 Like