How To…Dynamic Variables in RAP


“Is it possible to dynamically create multiple variables based on my data via RAP code?”


Use a TList object in RAP to keep track of each variable created in RAP. This way when you need to assign each value, you will have a reference to every variable you dynamically created. Use the OnCalc of an invisible variable as a way to assign each dynamic variable’s value. See the example below for more information.


Sample RAP code: