I'm always trying to learn how to make expressions more efficient. While i realize that this won't necessarily equate to any sort of performance boost, i am very much interested in writing clean, lean expressions with minimal bloat.
Can this be condensed? What i want to do is detect the value of the column [Will Not See] in a record, and if that value is not equal to either Not Seeing or Will Not See, but changes to either of those values upon record update, log the timestamp and who selected those options. So this is tentatively the event that will trigger an automation.
AND(
OR(
[_THISROW_BEFORE].[Will Not See]<>"Today",
[_THISROW_BEFORE].[Will Not See]<>"Not Seeing"
),
OR(
[_THISROW_AFTER].[Will Not See]="Today",
[_THISROW_AFTER].[Will Not See]="Not Seeing"
))
Solved! Go to Solution.
Not a big win:
AND(
IN([_THISROW_AFTER].[Will Not See], LIST("Today", "Not Seeing")),
NOT(IN([_THISROW_BEFORE].[Will Not See], LIST("Today", "Not Seeing")))
)
Note that your original logic was wrong. This:
OR(
[_THISROW_BEFORE].[Will Not See]<>"Today",
[_THISROW_BEFORE].[Will Not See]<>"Not Seeing"
)
Should be:
AND(
[_THISROW_BEFORE].[Will Not See]<>"Today",
[_THISROW_BEFORE].[Will Not See]<>"Not Seeing"
)
AND(), not OR().
This just got a lot simpler now that I am paying more attention to what options are available for that column, so now i am using the following, but i would still like to know how i could have improved the above.
AND(
ISBLANK([_THISROW_BEFORE].[Will Not See]),
ISNOTBLANK([_THISROW_AFTER].[Will Not See])
)
Not a big win:
AND(
IN([_THISROW_AFTER].[Will Not See], LIST("Today", "Not Seeing")),
NOT(IN([_THISROW_BEFORE].[Will Not See], LIST("Today", "Not Seeing")))
)
Note that your original logic was wrong. This:
OR(
[_THISROW_BEFORE].[Will Not See]<>"Today",
[_THISROW_BEFORE].[Will Not See]<>"Not Seeing"
)
Should be:
AND(
[_THISROW_BEFORE].[Will Not See]<>"Today",
[_THISROW_BEFORE].[Will Not See]<>"Not Seeing"
)
AND(), not OR().
User | Count |
---|---|
44 | |
31 | |
29 | |
14 | |
14 |