Skip to main content
Solved

Simple conditional work does not work, does anyone know why?


Kim_Trager1
Forum|alt.badge.img+20

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?

Best answer by TheTimeSavingCo

Try doing this instead:

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

Seems to work

 

View original
Did this topic help you find an answer to your question?

7 replies

pressGO_design
Forum|alt.badge.img+19

Can you share what rollup you're using?


TheTimeSavingCo
Forum|alt.badge.img+28

Try doing this instead:

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

Seems to work

 


Kim_Trager1
Forum|alt.badge.img+20
  • Author
  • Inspiring
  • 154 replies
  • April 8, 2024
pressGO_design wrote:

Can you share what rollup you're using?


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


Kim_Trager1
Forum|alt.badge.img+20
  • Author
  • Inspiring
  • 154 replies
  • April 8, 2024
TheTimeSavingCo wrote:

Try doing this instead:

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

Seems to work

 


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


Forum|alt.badge.img+19
  • Inspiring
  • 382 replies
  • April 8, 2024

 

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.


pressGO_design
Forum|alt.badge.img+19

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


Kim_Trager1
Forum|alt.badge.img+20
  • Author
  • Inspiring
  • 154 replies
  • April 8, 2024
AlliAlosa wrote:

 

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.


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


Reply