Trying to nest If conditionals and can't figure it out

I’m trying to figure this out and can’t for the life of me. Basically, this was a template in the AirTable Universe and when it’s a meal from leftovers I want it to say not just “Leftovers”, but which leftovers: ie “Leftovers (Beef Tacos)”. But I cannot for the life of me figure out how to do it. Here’s the formula that is currently in the table:
Screenshot formula

I tried to do nesting IF statements and could not get it to work. I saw on a different post here that some people have conditional roll up fields, but I don’t seem to have that option (there’s no toggle on my roll up options to add conditions). Help is appreciated.

This has nothing to do with nesting IF() functions or rollups (conditional or otherwise). The problem here is that by pulling the name of the meal selected in {Leftover from Meal}, you’ll create a circular reference: you want the {Name} formula to pull from {Leftover from Meal}, but that’s linking back to a record in the same table, whose name may be affected by the link in {Leftover from Meal}, etc.

To solve this, make {Leftover from Meal} a link to the same table used in the {Meal Prep} field. Then your {Name} field formula can be this:

{Meal Type} & ": " & IF({Meal Prep}, {Meal Prep}, "Leftovers (" & {Leftover from Meal} & ")")

@Justin_Barrett
It looks like @Emma_MH is using a same-table link for the leftovers field. I don’t know if that causes a possible circular reference error or not, but wanted to point it out just in case.

EDIT - I suppose I should read your whole post, and not just your formula, before I go trying to make corrections :slight_smile:

1 Like

THANK YOU!!! That solved it. Appreciate the help!

1 Like

@Emma_MH – I think you accidentally marked my response as the “Solution”. Could you please mark @Justin_Barrett’s response as the “Solution”, for the sake of future forum users? Thanks.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.