Additional Scope: Value Fallback

I'm using a combination of an additional scope and custom/fallback value to filter a query. However, whenever the query runs, the argument between curly brackets evaluates to NULL—where I’d actually expect it to return 7.

I’ve checked the debug panel, and it confirms that the result is indeed NULL, not any positive integer. To rule out side effects, I even tested this in isolation within a separate module, and the outcome was the same.

It seems like a strange quirk—or possibly a bug—that occurs specifically when you're relying on a potential id from the additional scope and have a fallback value defined.

I figured I’d flag this, as I suspect I won’t be the only one running into it. Given the fairly generic setup, others are likely to stumble across the same behaviour.

Furthermore, I don't expect doing anything out of the ordinary. Assuming the id is null, undefined or otherwise would seem logical to me. But do point out if I'm overlooking something.

To be clear, please find below a screenshot of what I'm doing:

By the way, if this behavior was by design, then I guess I would turn this bug report into a feature request instead.... That is, it would make sense to using a fallback whenever the additional scope is missing.

Hi @emozio

you're right, weird behaviour.

As a workaround, this version works as expected:

Hope this helps.