Using `ctx` to access source field


What does ctx stand for? I can't find it in the docs.

(Val Crettaz) #2

Depends on the context. Care to tell more?

Here are some uses of the ctx variable:


I'm just more curious about the name of the variable itself, regardless of use context. Does ctx stand for something? "Something transaction"? Why choose the letters ctx?


Oh wait... context... right?

(Val Crettaz) #5

yes, ctx provides "context" for your scripts


So I'm still somewhat unclear on its need though. Context is just what the values of the document are, right? Wouldn't that be the same as just accessing the doc values?

(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.