Following DATETIME_FORMAT with field names

Hi Airtable Friends,

I want to combine four things in my primary field: (1) Story ID#, (2) Date, (3) Storyteller, and (4) Story Title – all separated by a " - ", of course. I was able to get the first two things with this formula:

({Story ID#} & " - " & DATETIME_FORMAT(Received, ‘DD/MM’)) & " - "

But when I follow this up with {Storyteller} & " - " & {Story Title}, I get a message that says: “Sorry, there was a problem saving this field. Can’t save field because it causes a circular reference.” To be clear, here’s the full formula that keeps getting rejected:

({Story ID#} & " - " & DATETIME_FORMAT(Received, ‘DD/MM’)) & " - " {Storyteller} & " - " & {Story Title}

I’ve tried a number of variations using parenthesis and curly brackets, but always get the “sorry” message. Grateful to anyone who can help me get past this irksome obstacle!

Hi @Alba_Machado
You’re just missing 1 single & :slight_smile:

This should work for you:

{Story ID#} & " - " & DATETIME_FORMAT(Received, 'DD/MM') & " - " & {Storyteller} & " - " & {Story Title}

Every new statement in there, whether it’s a reference to a field, or a string enclosed in "...", needs to be concatenated, or “added on” to the end of the chain with a new & symbol. You were just missing one in-between the second " - " and {Storyteller}.

Alas, it did not work for me. :slightly_frowning_face: But thanks for taking a crack at it!

Oh, I should have explained: I got the exact same “sorry” message.

Ah! It was bad quotes too – I updated my formula above to remove the bad quotes; can you try it again?

Tried again and this time it’s “invalid formula.” Checked, and that was actually the “sorry” message the last time, too. So it didn’t repeat exactly the same message, but it still doesn’t work.

Ok, let’s take a look at the DATETIME_FORMAT() function then – that seems the most likely culprit here. I’m looking at docs and will post back.

1 Like

Thanks so much! I’ve been digging around too because I’ve never had trouble before trying the DATETIME_FORMAT function

Hmm - your formatting there seems ok. And everything else about the formula looks right.

When you tried the formula that I posted above, did you copy the entire formula out of the code box that I posted? If not, can you try clearing your formula editor entirely and paste in my formula exactly as it is in that code box?

I did the first time, but I tried again just now in case I slipped up somehow. And still no. :anguished:

Are any of the following fields also Formula fields?

  • {Story ID#}
  • {Storyteller}
  • {Story Title}

Can you give the formula expression for them?
You might have a circular reference (directly or indirectly) between fields that’s causing the error.

Usually Airtable throws a specific “Circular Reference” error for that. But definitely worth double checking on those field references, because everything else about the formula looks right.

@Alba_Machado - and here I thought this was a simple little fix. I’m kind of stumped right now lol.

Storyteller is a linked field, but I removed it from the formula and even with just Story Title, which is just single line text, it still doesn’t work.

What kind of field is {Received}?

{Received} is a Created Time field

Out of curiousity, @Alba_Machado, can you try copy/pasting this and see what happens?

T({Story ID#}) & 
" - " & 
DATETIME_FORMAT(Received, 'DD/MM') & 
" - " & 
T({Storyteller}) & 
" - " & 
T({Story Title})

“Circular reference” again

Ah, so it IS a circular reference error!

1 Like

Can you try and delete this line:
T({Storyteller}) &

Deleting the T({Storyteller}) line did the trick! Now I’ll just have to figure out how to get the author’s name in there. Maybe using a Lookup instead of the Linked