See the first part of my answer. Transform scripts use the Python language. Ignition’s built in expression language is a totally separate language, so if you attempt to use expression language functions in a Python script expecting Python functions, it’s like you’re going to Spain and trying to speak with people there in Chinese 
You might look into the Ignition docs page here for a quick primer on scripting. If you’re unfamiliar with Python (or programming in general, really), I highly, HIGHLY recommend searching for some free web tutorials to help you get started in Python. You may also benefit from the courses Inductive Automation offers at https://www.inductiveuniversity.com/ (which don’t cover Python, but do cover all the features in Ignition and how to use them
)