Objects can be imported with an Excel connection. These imported objects are all shown on the same level. If you want the imported objects to be shown hierarchically, you can use a script. With this script objects can be indented to show hierarchy. This topic describes how you can import objects and arrange them using a script. Business functions are used as an example.
In your connection, add two Business Functions and use the following mapping:
- Column A is used to set the Parent ID
Column B is used to import the objects.
Column C is used to import the Composition relation
Make sure the columns in your Excel sheet corresponds with the mapping. You can use an example like this:
Import the Excel file. When using the above example, the model browser should look as below. The imported objects are all on the same level.
To arrange hierarchy run the below script. Open the Query editor, run the script, and refresh the model browser.
The result looks as follows:
Below you can download an example model and Excel file: