Well, this forum is about scripting and to 99% its about Java Script. However, as you know the tool also supports OCL (Object Constraint Language) which might be the better choice in certain situations, especially when scripting a "Derived Property".
Assume you wan to see allocated requirements for each Component in an FMEA table. Customization is done for "Component" under FMEA:

Create a new derived property and choose "OCL" as language (well, its the default anyway). The script looks like this:
-- list all requirements that have a trace to the component
self.element.oclAsType(sysml::SysMLElement).mediniGetTracedElements(safetygoals::SafetyRequirement)
So just a short navigation from the component entry to the "element" and from there collect all traced requirements. As you can see, short and neat.
Hope that gives you some ideas how to solve your own custom columns using OCL rather than Java Script.
Happy Scripting
Jan