In some cases the final Type must be set correctly on the Expression Editor in order to see a result displayed on a table column, even if you can see results fine in Evaluation Mode.
[Under the hood there is some translation going on required to display the results in table columns. If you want to see the gory details, try a Groovy script directly in the Expression Editor and interrogate in Evaluation Mode mode with the Java .class
of each stage; you'll see that there are MagicDraw specific and ECore wrapper classes used.]
In the example shown, a (not so pretty) Groovy script was used to convert the text 'Id' to an Integer 'Id' (for use in an Excel export):
arg1.getOwnedElement()[1].getValue()[0].toInteger()
In Evaluation Mode against a test Requirement the integer id could be seen fine. But with the Type left open as Integer
primitive was required to make it display in the column.