Here’s the documentation for various options on the Custom Field modal:
- Fetch From: When you want your Custom Field to be ‘Link Field’, you would be required to specify the Form to which this Field is to be linked. E.g., you want to create a Custom Field ‘Project’ in the DocType ‘Item’. You would be required to enter to specify your Field Type as ‘Link’ and enter ‘Project’ in the Fetch From Field to ensure that the Field is updated with the list of all the required DocTypes.
- Fetch If Empty: This check-box will ensure that this Field will be not overwritten based on Fetch From if a value already exists.
- Default Value: Enter the default value of the Field which you would want to be fetched for this Field.
I’m trying to auto-name a Task based on a “Project Key”, which is a custom four-character Identifier for projects. Similar to the way Jira works.
I’ve defined a custom field “Project Key” in the Project doctype.
Now, when I create a task associated with that Project, I’d like the Project link to be automatically filled in, but I’d also like a “Project Key” field to be populated from the same project either when the Task is created, or even better, have the Project Key get updated any time the Project fields gets populated or changed.
My intuition is that the “Fetch From” field should be able to retrieve this value with something like this:
You probably know that this has no effect and the Project Key field remains empty.
Upon reflection, this makes some sense, since the “Fetch From” field may not know which Project to pull the code from.
How can I retrieve the Project Key from the linked Project automatically upon task creation?
The end goal, is to be able to use the Project Key to name the task, so a task attached to project with a key “RAIC” would use an auto name formula to name the task with the pattern RAIC-0001.