Slice doesn't work correctly

Hi everyone,

I am currently building an app and I got stuck with a slice formula.
Here is the formula :
AND( IN(USEREMAIL(), SPLIT(SELECT(Routing[Email Responsables], [_THISROW].[Logiciel] = [Logiciel]) , ", ")) , [Statut] = "Non traitรฉ")

At first, it didnโ€™t work, but when I tried to test my formula the test panel showed me the result I was hoping for.

I then replace USEREMAIL() with my actual email and it worked.
I then replace my actual email with USEREMAIL() and it worked.

The formula was good but I canโ€™t figure why this error happened.

I search on the Appsheet community and I saw 2 topics where the people had the same problem as I did :

I am a bit worried because I donโ€™t want my app to be down on production.

Do you have any suggestions or any tips to provide me?

Thanks in advance,

Erwan

0 4 160
4 REPLIES 4

If you only expect a single row returned by the SELECT, then try this:

AND( IN(USEREMAIL(), SPLIT(ANY(SELECT(Routing[Email Responsables], [_THISROW].[Logiciel] = [Logiciel]) , ", "))) , [Statut] = "Non traitรฉ")

It seems that the column [Email Responsables] is already a list. When returning it from a SELECT it would actually be a List of Lists. You need to need pick off the First (and maybe only) item from the result and then SPLIT that.

If it doesnโ€™t make sense then Iโ€™ll explain in more detail.

If you are expecting several lists of [Email Responsables] returned from the Routing table by the SELECT, then they all need to be โ€œflattenedโ€ into a single list - rather than a List of Lists. Iโ€™d have to lookup/figure out that syntax.

Steve
Platinum 4
Platinum 4

In your SPLIT() expression, ", " (comma-space) should be "," (without the space).

Steve
Platinum 4
Platinum 4

How I would write your expression:

AND(
  ("Non traitรฉ" = [Statut]),
  ISNOTBLANK([Logiciel]),
  ISNOTBLANK(
    FILTER(
      "Routing",
      AND(
        ([_THISROW].[Logiciel] = [Logiciel]),
        (USEREMAIL() = [Email Responsables])
      )
    )
  )
)

Thank you for both of your responses!
I added both of your ideas and it seems to work correctly!

Top Labels in this Space