So far, you’ve seen several fields with select menus in your forms. Below is an example of this on the Department creation form (look at Head of Department).


The menu’s options show the first names of that department’s Staff members. If you recall we set the first name as the Meaningful Key.
Problem: Now this data isn’t enough to identify a person, you might need more information on an individual in order to make your selection. We’ve already looked at one solution to this problem - combining multiple fields into one field that will then be marked as the Mark as dropdown Label . This works, but might not always be the best solution. Suppose you want to select a department head and the person selected has to pass some criteria, for instance they have to have a certain role, they have to have been employed there for X number of years, e.t.c. A key field created with all this information might be too long, plus it will also be a bit contrived; the field won’t make much sense if it appeared anywhere else where the key is used.
Solution: A better solution to this, would be to change this field from using a Select Menu to using a Pop-up Select Menu. To do this, head over to Manage Tipos and edit the Department Tipo.
Open the Advanced Editor of the Head of Department field and then scroll down to the Relationship Settings section. Turn on the Popup Select switch and save your changes.
Now if you go back to the Department form and try to select an option from the Head of Department menu, a separate menu will pop out containing the options with more of their fields displayed. By default, the options will appear in a Flow layout.

To change this to a Grid Layout, edit the Staff Tipo and set its Desktop and Tablet Grid to true (switch on the switch)

Then set its Grid Max Columns to 6 to increase the number of columns seen.

Now if you look at the pop-up select menu, it will display the options in a Grid Layout with 6 columns.

You can modify this menu to allow the creation of an option (in this case a Staff member). To do this, edit the Department Tipo and open the Head of Department field. Go to Relationship Settings Tab, switch on the Allow Create When Choosing Related switch and save the Tipo.
Now, your pop-up select menu should look as shown below. You will be able to create an option on the fly right before selecting it.

If you click on the New button, a dialog window will pop up containing a Staff creation form. A record that you create with this will be automatically added to your list of options for the select menu as well as to your Staff database of records.

Comments
0 comments
Please sign in to leave a comment.