Help

Re: How to configure the "Creating tasks from a template" script to not fill the primary field?

Solved
Jump to Solution
1649 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Josh_Colina
6 - Interface Innovator
6 - Interface Innovator

Hello!

Context
I am trying to develop a base to effectively manage project management and task delegation for my company. We create art assets for clients, where each asset goes through multiple stages of production before final delivery. This is somewhat standard project management, where each “Asset” roughly corresponds to a “Project” and each stage of production corresponds to a “Task.” We offer a semi-specific menu of asset types, so each asset type may also have different stages of production (and therefore, different associated “tasks”).

I had posted a question earlier regarding batch creating tasks from a template to operationalize this process and was thrilled to get connected to the Creating tasks from a template script located here: Creating Projects/Tasks From Templates | BuiltOnAir

Although I have no background in scripting or coding, I did manage to successfully integrate the script into my base, which is linked here as a tester (stripped of other functions I’m working on building in, for maximum clarity!)

Link to base :point_right: Airtable - Community Ask

Question
This question is regarding a “nice to have” functionality that will help me create more streamlined views for our artists in the Tasks table.

This script currently requires that the primary field in the Tasks table be a free-text field that it will then fill with data from the Task Templates table. To make more specific task names, I was wondering if there’s a way to reconfigure the script to actually fill into a different field when creating new records (perhaps something involving identifying by the record ID?) and leave the primary field open. My intention here is to make the primary field a concatenate formula that will combine the asset name and the task name that is generated by the script, mainly for more consistent and scalable documentation practice.

i.e. AssetName_TaskName

Thank you for checking this question out!

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

This is definitely doable, and pretty easy. I believe this is the line that you need to tweak in the script that you referenced:

const task_primary_field_name = 'Task Name';

Even though the variable name refers to it as the primary field, you can insert the name of (almost) any field in place of “Task Name” and it will add the task name in that field. (“almost” = it must still be a field that can accept text; e.g. single-line text or long text, depending on your preference/needs.)

See Solution in Thread

2 Replies 2
Justin_Barrett
18 - Pluto
18 - Pluto

This is definitely doable, and pretty easy. I believe this is the line that you need to tweak in the script that you referenced:

const task_primary_field_name = 'Task Name';

Even though the variable name refers to it as the primary field, you can insert the name of (almost) any field in place of “Task Name” and it will add the task name in that field. (“almost” = it must still be a field that can accept text; e.g. single-line text or long text, depending on your preference/needs.)

Thank you! Like you said, definitely a very painless fix (and a sign for me to start reading up on basic Java script for stuff like this :laughing: )