Aris Scripting Tutorial - Part 2b - Findings
- Backup your development results regularly (via Export)
- A variable has to be defined; you can define it everywhere in the code by using the var command.
- Make yourself comfortable with java types like strings, lists, compare operations, etc. All of them are helpful and you may need one of these earlier then expected.
- Use custom functions to store code centrally and make it reusable, you also may use the import functionality to access code elements already written
- A function has not to give back a return value (but can)
- Global objects like ArisMetaModel (Context.getArisMethod()), ArisData, Context etc. are sometimes not available in all environments (reports, macros or semantic check; client or server). Consult the script help to get more details.
- You can get similar information from different objects (Model name from context or from the current object occurrence)
- Object names are language dependend, use the function "Context.getSelectedLanguage()" to get the names correctly.
- The way to initialize Excel output differs from plain text. You need to enhance your code to get data in Excel.
- Use the String Table to support multilanguage (will be discussed in this tutorial).