1 Context
2 Result
3 Step by step guide
3.1 Add the customer and item grid
- Please duplicate the grids “CustomerGrid” and “ItemGrid” again and name them accordingly. If you need help here please take a look at chapter 80 & 90 ☝️
- Drag and drop these objects to the simple swat tabbar in your OrderOverview screen
- The “CustomerGrid_<yourName>” belongs to panel A in the tabbar on page “Customer Information” tab
- The “ItemGrid_<yourName>” belongs to Tabbar panel A on page “Item Information” tab
- Add the “TrainingCustomerDSO” to the screen (By dropping it in the title of the window inside the “Design view”, you will see that the highlight it becomes green indicating that it is the correct area to drop it)
- Add the “ItemDSO” to the screen (Same as previous step)
- Add the “OrderLineDSO” to the screen (Same as previous step)
- Go to the “Flow View” tab and connect the next object (You can see the result picture below)
- “OrderDSO” with the “TrainingCustomerDSO” with the “Link type” -> “Data”
- “OrderDSO” with the “OrderLineDSO” with the “Link type” -> “Data”
- “OrderLineDSO” with the “ItemDSO” with the “Link type” -> “Data”
- Set the following connections: (You can see the result picture below)
- TrainingCustomerDSO → (Data) → CustomerGrid_<yourName>
- ItemDSO → (Data) → ItemGrid_<yourName>
The DSO cannot be added to any panel because the belong to the screen level and it can be used by any object of the screen
3.2 Configure the connections with foreign keys
Now we are going to filter the "Customer Information" tab, so it only shows the specific record that matches the selected record in the "OrderGrid" by attribute "CustomerNum".
- To do so, please select "TrainingCustomerDSO" and search for the attribute "ForeignFields" in the "Attributes" panel
- Fill the "Attribute Value" with "CustNum,CustNum"
- Please select the "OrderLineDSO" and search for the attribute "ForeignFields" in the "Attributes" panel
- Fill the "Attribute Value" with "Ordernum,Ordernum"
- Please select the "ItemDSO" and search for the attribute "ForeignFields" in the "Attributes" panel
- Fill the "Attribute Value" with "Itemnum,Itemnum"
- Launch your screen to see the result
With this we create a relationship between these attributes in the two DSOs – (key value relation).
With this connection we see the customers which relate to an order.
3.3 Change the size and the alignment of a grid
Since the "CustomerGrid" holds many attributes, not all relevant to the use case, we now want you to filter out most of them and only make Customer Number, Address, City and Name visible in the Grid.
- Head back to the "Design View" tab and select the "CustomerGrid_<yourName>" in the "Design View" panel, then find the field "instanceRestriction" in the "Attributes" panel
- Fill the "Attribute Value" with "!CustNum,!Name,!Address,!City,!Country,*"
The final change will be to configure the order of the columns of the "CustomerGrid".
- To do so we drag the columns to their intended position in the launched page. For example, moving "Name" to the left side of the "CustomerGrid".
- To make this change permanent you have to press ”Control+Shift+ S”, which will prompt a popup asking you whether you want to save the repository-setting changes for the changed "CustomerGrid"
This change however is not permanent.