Lets consider a form and you are choosing a state and the form should display list of states to choose from, however, the list should be different depending on what you have selected in the country dropdown.
This quite a common scenario, in our student management system, we have similar situation. Each student application must belong to a department and a staff member from that department should be assigned to the application.
To achieve that lets add two more fields in the Application tipo called Department of type Department and another field Managing Staff of type Staff . To do this, access Manage Tipos from in the develop mode and edit to add these two fields as shown below:

Now go back to the application home and access Application tipo from the home menu and create a new Applciation you will be presented the form to choose department and managing staff as shown below:

Problem
Regardless of which department is chosen, managing staff listed does not change and all the staff in the system will be presented to choose from. Ideally, user must be presented with staff from the selected department.
Solution
This is a common requirement and to meet this need, TipoTapp allows you to supply relationship filter based on what is currently selected in the from.
When user clicks on Managing Staff dropdown, TipoTapp fetches data from the server and you as the creator can provide a Relationship Filter to restrict to only staff from that department.
To enter the relationship filter, go back to the develop mode and edit Application tipo and expand the Managing Staff field and choose the Relationship Settings tab and enter the following
(department:$tipo.department)
In the filter above, $tipo.department will be replaced with what is selected in the previous field and server will query the Staff tipo for data with a filter like (department:Machine Learning)

Done and save. You will now see when filling application you can only access staff for the selected department !!!
Comments
0 comments
Please sign in to leave a comment.