Isaac
Lifelong Learner
- Local time
- Today, 12:30
- Joined
- Mar 14, 2017
- Messages
- 11,111
Hello, I have a column in a query sourced as follows:
I swear this was working a few minutes ago! The only thing I CHANGED ... is, So as you can see in my screenshot, there is a source 'table' SharepointIDs_to_BusinessUnits, which is left joined to qryID_and_BU_CompleteStatus. In my Switch statement, I wanted to evaluate whether:
- nothing was returned at all from qryID_and_BU_CompleteStatus (null)
- otherwise, return a specific column from qryID_and_BU_CompleteStatus
Previously, I had SharepointIDs_to_BusinessUnits left joined to qryID_and_BU_CompleteStatus on SharepointID > SP_ID (and was testing if THAT was null on right side)
Now, I changed it to left join SharepointIDs_to_BusinessUnits to qryID_and_BU_CompleteStatus on BusinessUnitID > BU (now testing if THIS is null on right side).
I realize there's probably 3 different ways to do this, but I'm fond of Switch. Why the heck is my Switch statement having a problem with this??
PS - it's giving an #Error ONLY on the records where the switch statement should return "N/A - Submission Not Extracted from SP Yet".
Code:
BU Completion Status: Switch(IsNull([qryID_and_BU_CompleteStatus].[BU])=True,"N/A - Submission Not Extracted from SP Yet",IsNull([qryID_and_BU_CompleteStatus].[BU])=False,[qryID_and_BU_CompleteStatus].[Complete])
I swear this was working a few minutes ago! The only thing I CHANGED ... is, So as you can see in my screenshot, there is a source 'table' SharepointIDs_to_BusinessUnits, which is left joined to qryID_and_BU_CompleteStatus. In my Switch statement, I wanted to evaluate whether:
- nothing was returned at all from qryID_and_BU_CompleteStatus (null)
- otherwise, return a specific column from qryID_and_BU_CompleteStatus
Previously, I had SharepointIDs_to_BusinessUnits left joined to qryID_and_BU_CompleteStatus on SharepointID > SP_ID (and was testing if THAT was null on right side)
Now, I changed it to left join SharepointIDs_to_BusinessUnits to qryID_and_BU_CompleteStatus on BusinessUnitID > BU (now testing if THIS is null on right side).
I realize there's probably 3 different ways to do this, but I'm fond of Switch. Why the heck is my Switch statement having a problem with this??
PS - it's giving an #Error ONLY on the records where the switch statement should return "N/A - Submission Not Extracted from SP Yet".