Hi.
Would it be something wrong with my expression so I get different results in the editor than the expected ones from the test view?
Below the first name should not appear in the form list as shown in the test view.
Maybe missing , before TRUE ?
,TRUE
Hi @Heru,
Thanks for spotting this! Unfortunately after fixing this one, it still not working in the editor.
FILTER(โEmployรฉsโ,TRUE)-
SELECT(Affectations[Employรฉ ID],
AND(([_THISROW].[Opรฉration ID]=[Opรฉration ID]),
IN([Statut],{โAcceptรฉeโ,โPlanifierโ,โPubliรฉeโ}),
([_THISROW].[Parcours ID]=[Parcours ID]),
([_THISROW].[Employรฉ ID]=[Employรฉ ID])
),
TRUE)
The emulator is displaying the label column value for the corresponding rows in the Employรฉs table. Perhaps the label column doesnโt match the key column?
Hi @Steve,
Subtle! In this case the label column value for the Employรฉs table is the key column Employรฉ ID.
Would it be the only distinction for the emulator?
> Thigh Ugh , Alexy Maurin , Vicky Prรฉvost , Marc-Antoine Turcotte , Christian Bond , Martin Leblanc :: AFFECTATIONS[Employรฉ ID] :: AND(([Affectation ID].[Opรฉration ID] = [Opรฉration ID]), IN([Statut],LIST(โAcceptรฉeโ,โPlanifierโ,โPubliรฉeโ)), ([Affectation ID].[Parcours ID] = [Parcours ID]), ([Affectation ID].[Employรฉ ID] = [Employรฉ ID])) :: True | Thigh Ugh , Vicky Prรฉvost , Marc-Antoine Turcotte , Christian Bond , Martin Leblanc |
---|---|
Thigh Ugh , Alexy Maurin , Vicky Prรฉvost , Marc-Antoine Turcotte , Christian Bond , Martin Leblanc | Thigh Ugh , Alexy Maurin , Vicky Prรฉvost , Marc-Antoine Turcotte , Christian Bond , Martin Leblanc |
AFFECTATIONS[Employรฉ ID] :: AND(([Affectation ID].[Opรฉration ID] = [Opรฉration ID]), IN([Statut],LIST(โAcceptรฉeโ,โPlanifierโ,โPubliรฉeโ)), ([Affectation ID].[Parcours ID] = [Parcours ID]), ([Affectation ID].[Employรฉ ID] = [Employรฉ ID])) :: True |
Alexy Maurin is missing in my copy/paste as the resulting value for the last expression.
I canโt explain the difference in results, but Iโm pretty sure thereโs no guarantee that FILTER() or SELECT() will produce results in any particular order. Iโd propose that if you want the results in a particular order, youโll have to order them explicitly, perhaps using ORDERBY() or SORT().
Hi @Steve,
The order of the names are not a concern in this topic only the fact the expression seem right according to the test emulator but does work in the app.
Are you saying that this expression needs records to be sorted(or same sequence) to work?
No, thatโs just the discrepancy I latched onto when you presented the problem initially. Sorry about that!
Are you using security filters?
I notice too that the Expression Assistant says youโre editing the suggested values expression for the Employรฉ ID column, but the column in the form is Employรฉ. Are those in fact the same column?
Yes.
I am not using security filters for Affectations, Opรฉrations, Parcours and Employรฉs tables.
Okay, next (last?) guessโฆ
There is a quirk with the is-equal operator (and the is-not-equal operator) where if the left-side operand is blank, the expression is TRUE regardless of the right-side value. So, in this expression:
AND(
([_THISROW].[Opรฉration ID] = [Opรฉration ID]),
IN([Statut],{โAcceptรฉeโ,โPlanifierโ,โPubliรฉeโ}),
([_THISROW].[Parcours ID] = [Parcours ID]),
([_THISROW].[Employรฉ ID] = [Employรฉ ID])
)
If [_THISROW].[Opรฉration ID]
evaluates to blank, ([_THISROW].[Opรฉration ID] = [Opรฉration ID])
is TRUE.
If [_THISROW].[Parcours ID]
evaluates to blank, ([_THISROW].[Parcours ID] = [Parcours ID])
is TRUE.
If [_THISROW].[Employรฉ ID]
evaluates to blank, ([_THISROW].[Employรฉ ID] = [Employรฉ ID])
is TRUE.
The IN() function is not affected by this quirk.
Itโs possible this quirk only affects the expression tester and not the emulator, or vice versa. Once I discovered the quirk, I decided I needed to assume it affects everything and always code for it.
Could this be the problem?
Hi @Steve
This quick seems very annoying! He got me. Thanks!
User | Count |
---|---|
43 | |
28 | |
24 | |
24 | |
13 |