Another Nest IF statement, what am I over looking

IF(LEN(quote)>1, “QUOTE(s)\n” & quote,
IF(LEN(fact)>1, “FACT(s)\n” & fact,
IF(LEN(note)>1, “NOTE(s)\n” & note,
IF(LEN(question)>1, “QUESTION(s)\n” & question,
“”))))

Structurally, the nesting is sound. What problem are you having with it? It might be due to the type of data in the {quote}, {fact}, {note}, and/or {question} fields. Are those text fields? Links? Lookups? Rollups? ???

quote fact note etc are Forumlas
TRIM(SUBSTITUTE(compileFacts,",","\n"))

compileFact, etc are Rollups
with ARRAYJOIN(values)

Thanks for the info, but you didn’t mention the problem you’re encountering. What is the behavior you expect from this formula vs what you’re actually getting?

Of course…
I want to cycle through and pick up all the TRUE values.
It is stopping after the first one is valid.
So if Quote is True, Quote prints
But valid Facts, Notes etc do not.
make sense?

Yes, that makes a lot more sense. :slight_smile: Instead of nesting your IF functions inside each other, they need to be separate, and their individual results concatenated. Try this:

TRIM(
    IF(LEN(quote)>1, “QUOTE(s)\n” & quote & "\n\n") &
    IF(LEN(fact)>1, “FACT(s)\n” & fact & "\n\n") &
    IF(LEN(note)>1, “NOTE(s)\n” & note & "\n\n") &
    IF(LEN(question)>1, “QUESTION(s)\n” & question)
)

I added line breaks after each one so that there’s some space between them, and wrapped it all inside a TRIM function so that any trailing line breaks are removed; i.e. in case the question section isn’t the last part included.

2 Likes

Justin you are awesome. Thank-you. That was exactly what I needed. Much appreciate your time.

1 Like