Bug ? blank datas comparison returns not equal

Hi there,

I dig into something weird:
[related_key_employe_accompagnateur]<>[related_key_employe_accompagnateur corrigé]
returns TRUE, mais these two items are blank when I look into it.

When I test the function, here is what I get:

These are identical type fields, both REF relating to the same Slice.
In my opinion, if these two datas are BLANK, then the result when I look for a difference must be FALSE.

I just looked a little further:
ISBLANK() on 1st field gives TRUE
ISBLANK() on 2nd field gives TRUE as well

I just spent a few hours trying to guess where this result may come from, but I didn’t get it.

Cherry on the cake, if I try:
[related_key_employe_accompagnateur]=[related_key_employe_accompagnateur corrigé]
I get TRUE as well :crazy_face:

But when one at least of the fields is not empty, I get the correct expected value.

I am currently building an email body template, I tried some workaround to avoid that but none of these work : comparing LEN(), comparing TRIM()…
I’m out of ideas.

Do you have any clue on what us happening ? Am I missing some information ?
Many thanks

:rofl:


There is a known issue with having a blank value as the first item inside an equality; I can’t remember the specifics, perhaps @Steve does.

But basically, if you’ve got a blank as the first part of [something] = [another] it can cause a false positive.

Change your formula to include checking that something ISNOTBLANK():

AND(
  ISNOTBLANK([related_key_employe_accompagnateur]), 
  [related_key_employe_accompagnateur] <> [related_key_employe_accompagnateur corrigé]
)
3 Likes

https://community.appsheet.com/search?q=@steve%20quirk

3 Likes

Very well, thanks @MultiTech_Visions and @Steve for your explanations.
I was turning crazy :rofl:

In the meantime I tried something that seems to fit my purpose:

TEST_isDifferent_field1_field2=
NOT(
     OR(
          AND(
               ISBLANK( [field1]),
               ISBLANK( [field2])
          ),
          [field1]=[field2]
     )
)

with your formula @MultiTech_Visions , maybe that will help someone:

AND(
  ISNOTBLANK([field1]), 
  [field1] <> [field12]
)

Many thanks to you both !

2 Likes