When developing logics, it may be useful to test (evaluate) individual code snippets. For that purpose, you can utilize one of the two Pricefx Groovy consoles available in Studio. Functionally, they are the same, but they differ in extra functionality: one supports input functions and the other PA queries. Technically, they both execute the code as if you would run a test execution of a logic with a single element where you pasted your code.
If you do not want to depend on a logic.json editor window and prefer to have the console in a separate window, you can utilize the PA SQL console (you can hide the SQL editor).
For a better user experience of |
This console can be useful if you want to try out the input related functions (like api.input(), api.stringUserEntry()
etc.) which return the values entered in the parameter tab.
In addition to Groovy Console (in the logic editor) there is also the PA SQL Console (in IDEA Tools). This console was originally developed to simplify development of Analytics queries using SQL, but it can be used for all purposes except for input related functions (for those the console in logic.json is designed).
You can check here that a piece of your logic will work, that a data type is correct, what the result data type of a variable will be etc. And, of course, you can run PA queries here.
toResultMatrix
is there just to display the result, you can remove it.