Examples of use - working with a data structure
Assignment of an object from a related structure
You can add not only lists to the data structure, but also relations to other structures and dictionary elements.
tip
For example: On the form display basic client data along with the information about marital status and address details.
The client's marital status is defined in the dictionary as it can have different values to choose from. The structure of Address and Client are 2 separate data structures.
- Create a Client data structure and an Address data structure.
- Create a dictionary with the Marital status category and the values Single, Married.
- Drag the Address structure into the Client structure from the version server.
- In the Client structure, add the MaritalStatus dictionary field.
Creating relationships and adding a dictionary to the structure
Defining many-to-many relationship
You can apply a relationship to another structure as a list to a data structure.
Business case: Display client data on a form, along with a list of invoices that are assigned to client.
- Create data structure Client and data structure Documents.
- Add a relationship to the Client structure in the Documents structure.
- In the Client structure, add the Documents structure as a list. The relationship in the structure will already appear as sprite so you don't need to add it. Right-click on the list element and select Fix.
- Then add a form based on the Client structure and add a list and other fields to it.
Adding a list to structure and creating a form