ERROR #00: (no error description) in Management Portal Display Mode
Hi Community,
I have a property in a class, properties Initial Expression set to 1
Thanks in advance.
Hi Community,
I have a property in a class, properties Initial Expression set to 1
Thanks in advance.
Create a simple %Status like
set status = $system.Status.Error(5001, "This is an error")
and if you do
I cut out a significant chunk (...) because it's not relevant.
You can see that the first character in status is "0", that is because if you try a unary operator
+status, -status, 'status
It will evaluate to the integer 0 and effectively work as a boolean flag. The part that matters is after the "0" inside the $listbuild.
The first element of $listbuild is the error code, followed by the message.
Because you set Test to 0 and nothing else, Objectscript recognizes that as a failure condition but has absolutely no information to provide beyond that. The recommendation is that you properly assign Test as a fully qualified %Status or change it to a %String where its value is equal to
To add to the above reply. %Status is not just a Boolean TRUE (1) or FALSE (0). It is a complex structure where if the Status is false it is represented as 0_$list(of all of the Error Information).
If you want to display the error code in SQL then create a calculated field "ErrorMessage" along side your field that stores the %Status value. Call that field MyClass.Status. Create a new field called MyClass.StatusErrorMessage and flag it as 'Calculated'
Then in either the OnBefore Save method or using a TRIGGER do the following:
in the ErrorTextGet() method
method StatusErrorMessage ()
{
quit $system.Status.GetErrorText(..Status)
}
Nigel