Jun 30, 2022 08:44 PM
Hi Airtable community! I have a field in my table where I need a formula that outputs the name of a project Slack channel based on the name of the project. However, since Slack only allows for lowercase letters, underscores and dashes, the formula writing is a little complicated.
I need to convert all letters to lowercase, convert spaces to underscores, and not include anything that’s in parentheses.
For example, the project name is: FA22 Project Name / Project Detail (Project Subtitle)
And the output I need is: fa22_project_name_project_detail
Help is greatly appreciated!
Jun 30, 2022 09:02 PM
Hi! The following formula should work if these two assumptions hold true:
LOWER( SUBSTITUTE( REPLACE( Name, FIND(" (", Name), FIND(")", Name), "" ), " ", "_" ) )
Jun 30, 2022 09:53 PM
So - now realizing something. Not every project name necessarily has parentheses. So the formula worked on every project title WITH parentheses, but not on the ones without. Is there an IF formula that can be added?
Jun 30, 2022 10:24 PM
LOWER( SUBSTITUTE( IF( FIND(" (", Name), REPLACE( Name, FIND(" (", Name), FIND(")", Name), "" ), Name ) , " ", "_" ) )