Ens.Rule.FunctionSet without parameter?
I'm writing some custom functions for use in a routing rule. I have a few that are working, but right now I'm trying to use one that has no parameters. Typically this would be a sub instead of a function, but I'm not familiar enough with Cache to know what I need to do here.
Here is the code:
{
/// Location and Revision of this file in Perforce (Auto-updating)
Parameter SrcVer = "$Id$";
/// Returns the current environment code,
/// DEVELOPMENT, TEST, LIVE
ClassMethod getEnvironment() As %String [ Final ]
{
q ^%SYS("SystemMode")
}
}
And here is what happens in the Rule Editor UI:
What should I do?
It seems to function fine, but the ( ! ) bothers me.
the UI here is not very clear - it suggests that you need an argument, but leaving the box empty should work just fine. No argument will be passed and everything will work fine.
Thank you David. Would it be preferred, or is it even possible, to reference ^%SYS("SystemMode") directly somehow?
And I suppose I could just pass a zero to avoid the warning indicator.
looking at the 2016.2 field test, the red exclamation mark has gone. It normally means the argument is required, so it shouldn't be there, but is doing no harm other than misleading people.
Good to know it's fixed in a newer version. I'll do my best to ignore it! :)
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue