Switch to script mode to build custom columns in the integrated development environment (IDE). To do this, click the Script Mode button from the Custom Column designer.
Once in script mode, build your custom column formula by adding the required custom column functions, hierarchies, and elements, or simply type your formula using PQL.
Follow the example bellow to learn how to build a custom column that creates a new product code by taking the first four characters from the Product Category, Product Subcategory and Product names, inserting a hyphen between the values.
Find the LEFT() function in STRING function group in the Tool-Panel and either double click or drag it into the text editor window.
Click on the Model Attributes Panel button at the bottomg of the screen. This will reveal the Model Dimension Tables. Open the table required. Delete or highlight the LEFT() function argument <Column String> and double click on the table column required, in this case [Product Category]. Replace the <Integer> argument with the number of characters to take form the beginning of the [Product Category] column value.
Type in and operator and other text required. In this case the character "-" is to be inserted between the four character codes.
Repeat the previous steps, adding the LEFT() function for [Product Sub Category] and [Product]. seperated by the "-" character.
Test the logic by clicking on the large Pyramid icon top left hand corner. This will check the syntax is correct and execute the logic against a sample query. The results will appear in the Result Preview Panel.
Click on the Save button and save the new Custom Column to its desired location.
Click on the "Quick Discovery" icon in the Ribbon to see the new custom column used in a Discover view.