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):
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! Go to 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"
User | Count |
---|---|
43 | |
26 | |
23 | |
16 | |
12 |