Forum Discussion
- mjs22New Contributor
how do you call the SI variable?
- tomdarnallNew Contributor III
Not sure where you're running this, but there are some areas within OS that require api.si, instead of just si.
- Richard_MayoNew Contributor III
Hi Christian,
Thanks for replying on this topic, as a little tangent - could you give a quick explanation of what "si" is simplistically? I've seen it around a lot and I've had to include it in certain bits of code without really understanding what it means (apart from the code doesn't work without it)!
Just intrigued what it actually does...!
Thanks,
Richard- JackLacavaCommunity Manager
It's an instance of the SessionInfo class, basically an object containing some basic stuff like who you are, when you logged on, etc. OneStream passes it to every Main function defined on the Main class of every custom business rule; if inside that function you then invoke some other function or sub, you have to explicitly pass the object around.
Most BRApi calls will require it, in order to define whether you're actually allowed to perform this or that action.
- Richard_MayoNew Contributor III
Brilliant, thanks Jack - very clear, a good learning for me - always wondered what it meant!
- ChristianWValued Contributor
Hi Mel
Your code is probably located in a function or a procedure where si doesn't exist. If you like to use si, you must pass the si variable to it.
I hope this helps and cheers
Christian
- mjs22New Contributor
How do you pass the SI variable?
Related Content
- 9 months ago
- 9 months ago
- 9 months ago