Help

Convert linked record names into unique comma separated values

Topic Labels: Formulas
Solved
Jump to Solution
1028 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Mark_Werner
5 - Automation Enthusiast
5 - Automation Enthusiast

I am creating standard project tasks from a template and am stuck with writing a formula that creates a comma-separated text string from the names of linked records but also adds the project name to the front of each record name in order to make it a unique name.

For example: my linked template records are Cat Dog Cow and the projects are Project 1, Project 2, etc. I want the resulting field to be Project 1 - Cat, Project 1 - Dog, Project 1 - Cow, and so forth. That way the “Cat” in project 1 is a unique record from the “Cat” in project 2.

Any help would be greatly appreciated!

1 Solution

Accepted Solutions
augmented
10 - Mercury
10 - Mercury

Hi Mark. Are you saying that “Cat”, “Dog”, and “Cow” are generic records in another table (i.e. there won’t be a different “Cat” record for every project that uses “Cat”)?

That way the “Cat” in project 1 is a unique record from the “Cat” in project 2.

The above sentence makes me think not, hence my confusion. If they are to be unique, then you’ll have a separate record for every project that includes them and you can define your task’s primary key to be a formula that constructs the label as you like.

Otherwise, you can’t change a linked field to have commas, nor display something other than the primary field of the linked record. You could create a formula field that prepends the project name to each task and returns a string. Like…

SUBSTITUTE(Project & '-' & Tasks, ',', ',' & Project & '-')

though I’m not sure for what purpose.

See Solution in Thread

2 Replies 2
augmented
10 - Mercury
10 - Mercury

Hi Mark. Are you saying that “Cat”, “Dog”, and “Cow” are generic records in another table (i.e. there won’t be a different “Cat” record for every project that uses “Cat”)?

That way the “Cat” in project 1 is a unique record from the “Cat” in project 2.

The above sentence makes me think not, hence my confusion. If they are to be unique, then you’ll have a separate record for every project that includes them and you can define your task’s primary key to be a formula that constructs the label as you like.

Otherwise, you can’t change a linked field to have commas, nor display something other than the primary field of the linked record. You could create a formula field that prepends the project name to each task and returns a string. Like…

SUBSTITUTE(Project & '-' & Tasks, ',', ',' & Project & '-')

though I’m not sure for what purpose.

Thank you so much! That worked PERFECTLY! Yes, “Cat”, “Dog”, and “Cow” are generic records in another table (they are a template that is applied to all projects). Only problem was that if the template record name is used to create the project tasks, it only creates new records if they do not already exits on another project. If they do, it simply adds a second link record. creating the unique link worked. Here is a link to what I was implementing, just needed that formula Create tasks from templates table via button automatically - Ask the community - Airtable Community ...