Expression evaluates differently within the system

I have narrowed down an issue to a relatively simple expression that seems to evaluate differently between a Detail View and a Form view. I am confident i have seen this similar problem in another app while helping someone else. I am wondering if anyone else is seeing this kind of issue?

The expression below simply checks that the Role of the person modifying the row is NOT the value of โ€œZeroโ€:

ANY(SELECT(Authority[Role], [User]=[_THISROW].[Modified By])) <> "Zero"

I assigned this expression to a Virtual Column to verify its result. When I look at a rowโ€™s Detail view, the expression is evaluated to โ€œNโ€ or FALSE (see picture below):

3X_3_f_3f041d4a05a743d02e0650f24cc5a6c2e68674c2.png

If I simply tap the Edit button to navigate to the row in the Form view, the value of the expression evaluates to โ€œYโ€ or TRUE (pic below):

The main issue is that this expression was part of a Workflow Trigger in a prod app. The Workflow was not correctly triggering. In a test version of the app, all is good if I remove the SELECT.

Thoughts?

Solved Solved
0 9 251
1 ACCEPTED SOLUTION

I have found alternative solutions. If the results are tested as Lists or if a TRIM() function is used, the expression always evaluates as expected. All of these expressions below work.

Comparing Lists:

SELECT(Authority[Role], [User] = [_THISROW].[Modified By]) <> LIST("Zero")
or
SELECT(Authority[Role], [User] = [_THISROW].[Modified By]) <> {"Zero"}

Using TRIM() function:

TRIM(ANY(SELECT(Authority[Role], [User] = [_THISROW].[Modified By]))) <> "Zero"

View solution in original post

9 REPLIES 9
Top Labels in this Space