Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Replacing a variable in a Formula using a Check Box

Topic Labels: Formulas
Solved
Jump to Solution
914 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Jerry_Leu
4 - Data Explorer
4 - Data Explorer

Hi All,

Trying to fix a goof in our Airtable.

Backstory:
We programmed a certain formula to add in the year a record was created into the record name(i.e. 2019 =19). We pre made some of these records in December, and now need to duplicate the records and have all the duplicated records keep the same name. I hope you all have realized the problem with this… If you haven’t all new records now automatically signify it’s 2020 and no longer 2019.

My Idea is to add in a check box to the records we want to fix to say "If box = 1 then replace “DATETIME_FORMAT(CREATED_TIME(), ‘YY’)” With “19.”

Here is the Original Formula:

IF({Class} = “STR”, “ROS” & “" & {Instructor} & "” & {Class} & “" & {Strength ID} & "” & DATETIME_FORMAT(CREATED_TIME(), ‘YY’) & “" & {Playlist})
&
IF(NOT({Class} = “STR”), "ROS
” & {Instructor} & “" & {Class} & "” & DATETIME_FORMAT(CREATED_TIME(), ‘YY’) & “_”& {Playlist})

This would spit out something like “ROS_EMILY_DANCE_20_3”

I know the above is not the prettiest thing, but I’m definitely just a beginner in this and any help would be appreciated!

TLDR:
I goofed in my auto naming formula cause I forgot about a little thing called years and how they worked.

1 Solution

Accepted Solutions
JonathanBowen
13 - Mars
13 - Mars

HI @Jerry_Leu - you can replace this:

DATETIME_FORMAT(CREATED_TIME(), 'YY')

with this:

IF(Checkbox, 19, DATETIME_FORMAT(CREATED_TIME(), 'YY'))

Screenshot 2020-01-04 at 02.22.27

JB

See Solution in Thread

1 Reply 1
JonathanBowen
13 - Mars
13 - Mars

HI @Jerry_Leu - you can replace this:

DATETIME_FORMAT(CREATED_TIME(), 'YY')

with this:

IF(Checkbox, 19, DATETIME_FORMAT(CREATED_TIME(), 'YY'))

Screenshot 2020-01-04 at 02.22.27

JB