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
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.
In your SPLIT()
expression, ", "
(comma-space) should be ","
(without the space).
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!
User | Count |
---|---|
35 | |
34 | |
26 | |
23 | |
18 |