Help

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

Solved
Jump to Solution
948 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Emma_MH
6 - Interface Innovator
6 - Interface Innovator

image

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.

1 Solution

Accepted Solutions

@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 :slightly_smiling_face:

See Solution in Thread

4 Replies 4

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} & ")")

Screen Shot 2020-06-24 at 4.07.45 PM

@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 :slightly_smiling_face:

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

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