# Re: Simple conditional work does not work, does anyone know why?

Solved
585 0
cancel
Showing results for
Did you mean:
9 - Sun

I have two rollup field I need to evaluate and for some reason I can't get it to work.

Field1: {rollupStockMinimum}

Field2: {rollupNonStockMinimum}

Field1 is empty, but Field2 is not.

I only want the formular to do something when there are something in both fields.

I've tried with this very simple formular

``IF(AND(Field1, Field2), True, False)``

However for some reason it evaluates to 'True' despite Field1 being empty

I've tried to just do IF(Field1, "True", "False") where it evaluates to False.

What is it I'm missing or don't understand?

2 Solutions

Accepted Solutions
18 - Pluto

``````AND(
{Field1} != "",
{Field2} != ""
)``````

Seems to work

10 - Mercury

For rolling up text, I usually use something like

ARRAYJOIN(ARRAYCOMPACT(ARRAYUNIQUE(values)))

ARRAYCOMPACT() will get rid of any null values, and ARRAYJOIN() converts the whole thing into a string. Using only ARRAYUNIQUE() might make the field appear empty, but under the hood it’s actually an array of an empty value, which - confusingly enough - counts as a non-empty value in a rollup field’s result.

7 Replies 7
10 - Mercury

Can you share what rollup you're using?

18 - Pluto

``````AND(
{Field1} != "",
{Field2} != ""
)``````

Seems to work

Just an ArrayUnique with a filter. I wonder if the filter some has anything to do with it?

No sure why I didn't think about that 😁 works, thank you. Still wondering why the other don't work though?

10 - Mercury

For rolling up text, I usually use something like

ARRAYJOIN(ARRAYCOMPACT(ARRAYUNIQUE(values)))

ARRAYCOMPACT() will get rid of any null values, and ARRAYJOIN() converts the whole thing into a string. Using only ARRAYUNIQUE() might make the field appear empty, but under the hood it’s actually an array of an empty value, which - confusingly enough - counts as a non-empty value in a rollup field’s result.

10 - Mercury

omg thank you @AlliAlosa - I was trying to distill the same thing without having had enough and it was all "sometimes empties aren't really empties because they're arrays of empties which rollups sees as fulls (maybe because the rollups haven't had enough coffee either)" and fortunately you posted before I clicked send on my barrel of word-nonsense. 😂😂

Ahh makes a lot of sense... Thank you for your explanation