Test view versus editor view show different results

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.

0 11 425
  • UX
11 REPLIES 11

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)

Steve
Platinum 4
Platinum 4

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.
2X_d_d3b92e11d266317ed1f87c73997032b52a06a71c.png

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!

Top Labels in this Space