Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Convert linked record names into unique comma separated values

Topic Labels: Formulas
Solved
Jump to Solution
301 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

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 ...